I'm using a very plain Ubuntu Server 9.04, and cron isn't delivering any mail to my /var/mail/USER (the file hasn't even been created). Here's my full crontab:
# m h dom mon dow command
15 * * * * $HOME/.cron/sync-bookmarks.bash
If I add
# m h dom mon dow command
15 * * * * $HOME/.cron/sync-bookmarks.bash >& /tmp/log
then I see the stdout and stderr in /tmp/log. I'm not (yet) interested in actual remote email delivery, just local delivery to the mail spool file. Why isn't mail working? Thanks in advance for any tips.
cron
calls/usr/sbin/sendmail
to deliver the mail.Did you install and configure a mail server (sendmail, exim, postfix, ...)?
--- EDIT ---
For the security aspect, all mail servers can be configured to accept only local mail and to deliver only local mail.
If you need a mail server, probably the easiest option to install
postfix
. The installation process will ask you how you want it configured, and I think one of the options it offers is to handle local mail only.