e-mail from cron

Lisa Casey lisa at jellico.com
Wed Aug 23 14:05:46 UTC 2006


Hi,

This ought to be a fairly simple question, but I've googled and can't really 
find the answer.

I'ld like to have the reports from the system cron jobs (daily run output, 
security run output, weekly run output and monthly run output) sent to an 
e-mail address other than root, but I want all  the "postmaster" stuff 
(mailer-daemon emails, etc.) to continue going to root (so I don't 
particularly want to just forward root's mail somewhere using the aliases 
file).

In /etc/crontab, I changed this:

# Perform daily/weekly/monthly maintenance.
1       3       *       *       *       root    periodic daily
15      4       *       *       6       root    periodic weekly
30      5       1       *       *       root    periodic monthly
#

to this:

# Perform daily/weekly/monthly maintenance.
1       3       *       *       *       root    periodic daily  2>&1 | 
sendmail service at jellico.com
15      4       *       *       6       root    periodic weekly 2>&1 | 
sendmail service at jellico.com
30      5       1       *       *       root    periodic monthly 2>&1 | 
sendmail service at jellico.com
#

but all I get is a blank email sent to service at jellico.com

What's the best way to accomplish this?

Thanks,

Lisa Casey



More information about the freebsd-questions mailing list