I recently installed ssmtp
on my server to enable e-mail notifications for a redmine
install. While I was verifying everything was setup correctly I got an e-mail notification about a failed cron job. This turned out to be really helpful and I never would have noticed it had I not set this up.
It's been a few days since and I haven't received any other e-mails from the system. By default, what mail gets sent to root?
By default, cron will mail all output from cron jobs to the owner of the job, whether they fail or not. (Root is the owner of the system cron job, and is configured as the mail destination for non-root daemon cron jobs.) Most system cron jobs are carefully written not to produce output unless something is wrong.
Any other program can send mail to root, but not many will in a default Ubuntu install. Things I have seen include
If you're writing your own cron jobs you can set
MAILTO
to control where the output is sent. (See also man 5 crontab.)