-
how to setup a user's mail account
This is probably going to be one of the easiest questions ever to answer, but how do I setup a user's mail account on my system? For example, I have a /var/spool/mail/root and /var/spool/mail/Brandon but only root's file contains anything. If I try to send something to Brandon@localhost ....it never shows up. For example:
Code:
[root@meatwad mail]# ls
Brandon root
[root@meatwad mail]# mail -s 'foo' root@localhost
hello, world
Cc:
[root@meatwad mail]# tail -n 5 root
To: root@localhost.localdomain
Subject: foo
hello, world
[root@meatwad mail]# cat Brandon
[root@meatwad mail]# mail -s 'test' Brandon@localhost
asdf
foo
bar
Cc:
[root@meatwad mail]# pwd
/var/spool/mail
[root@meatwad mail]# cat Brandon
[root@meatwad mail]#
Apparently my user knows that is the mail location though:
Code:
[Brandon@meatwad mail]$ set | grep MAIL
MAIL=/var/spool/mail/Brandon
MAILCHECK=60
Is there some trick to getting the non-root mail accounts working?
Last edited by gamblor01; 11-30-2007 at 07:03 PM.
"The author of that poem is either Homer or, if not Homer, somebody else of the same name."
-
Do you have an mta running on your machine (exim, etc...)?
If yes, is it running?
Is Brandon in the mail group??
Knute
You live, you die, enjoy the interval!
-
Considering I don't know what an MTA is (I just googled it...mail transfer agent) I'm going to have to say no to that one. I did try a "usermod -G mail Brandon" but that didn't help. So I need exim or something like it you say?
I wonder why the mailbox works for root already then??
"The author of that poem is either Homer or, if not Homer, somebody else of the same name."
-
MTA = Mail Transfer Agent (a mail server, like Sendmail or something.)
Last edited by klackenfus; 12-01-2007 at 12:43 AM.
I equivocate, therefore I might be.
My Linux/Unix Boxes:
Home: Slackware 10, CentOS 5.3, RHEL 5, Ubuntu Workstation 9.10, Work: RHEL 5, CentOS 5
-
Some distro's set them up automagically on install so that they can send you that superneat welcome message.
What distro are you running anyway?
All that I could think of was exim. Sendmail is more common to be installed by default. If you look in your package managers section regarding mail, you will find others.
To see what groups brandon is in is easy.
1) as the user (brandon in this case), issue the command:2) as root, issue the command:
Knute
You live, you die, enjoy the interval!
-
MTA = Mail Transfer Agent (a mail server, like Sendmail or something.)
Yup...I googled it.
As far as the distro goes it's Fedora Core 5. It's a virtual machine I've had around (and haven't messed with) for quite some time.
In any case, I have 2 project presentations to give next week and 2 homework assignments on top of that. I don't have the time to be messing around with this nonsense so I just sent the mail to /var/spool/mail/root and called it a day. This of course means I have a few scripts running as root but it's for a proof of concept only, so I only need it to work on Tuesday when I present it, then I'll shut everything down immediately afterwards so it shouldn't be a big deal.
On the bright side...everything is working beautifully right now! I have a google map on my website with 1 point plotted on it (my "starting point"). Then I send an email to a gmail address with GPS coordinates and fetchmail pulls it down via pop3 to my /var/mail/spool/root file. I wrote a shell script that sits in a loop, sleeping and checking the mail file for changes. When it senses the change, a Java program gets executed which parses the mail file then opens and inserts the tags into an XML file. Refresh your page and VIOLA! New points are plotted on the map.
Gotta love the sense of accomplishment when your code actually works the way it was intended.
"The author of that poem is either Homer or, if not Homer, somebody else of the same name."
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|