Postfix and Mutt
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.
Did you find this page useful?