Postfix and Mutt
From ComputingPlugs
There is a good chance that you will install a package that depends on postfix. If not, it is a good idea to install it anyway because cron communicates with the user through mail. You don't have to setup a mail server to send mail to the Internet (You could, if you like), but setting up a local mail server so the server could send you messages is useful.
You will also need a mail reader. I use mutt because it runs on a console window and it is light weight. To install, type:
apt-get install postfix mutt
When postfix ask what type of mail servers to setup, select local mail.
After the installing is done, the server will start sending you messages about itself. When you run mutt you may notice that you can't delete any emails and mutt gives you the message:
Mailbox is read-only.
This happens because the directory /var/mail does not have its permission set correctly. To fix it, type:
chmod g+sw /var/mail chgrp mail /var/mail
You may need to delete the mailboxes under /var/mail so that the permissions will propagate correctly to the user's mailbox. After you delete the mailbox, start mutt and it will complain about
/var/mail/<user>: No such file or directory (errno = 2)
That is ok, the mailbox will be created for the user when he/she receives an email. So send the user a test email and the error will go away.
|
|
Click here to leave a comment
Did you find this page useful? |
||


May 18 2009 3:51 pm
Please keep comments clean and constructive. Inappropriate comments will be removed. Thank you.
Sep 02 2009 10:59 pm
Mutt hangs with "Could not create temporary file!" when you try to read your first mail as a user. You even can't leave the program wie "q" after that. You have to delete /var/mail/ as root to do so. No idea what the problem is here but it makes mutt unusable.
Sep 03 2009 9:31 am
make sure you have write permission to your temp directory. For Linux, it is usually "/tmp" unless you manually changed the $TMPDIR environment variable.
Sep 28 2009 2:39 am
Mutt's tmp directory can be set from ~/.muttrc. I have
set tmpdir=~/tmp
in mine