Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Aug 2006 10:05:14 -0400
From:      "Lisa Casey" <lisa@jellico.com>
To:        <freebsd-questions@freebsd.org>
Subject:   e-mail from cron
Message-ID:  <012e01c6c6bd$29966ac0$d51a2cd0@lisac>

next in thread | raw e-mail | index | archive | help
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@jellico.com
15      4       *       *       6       root    periodic weekly 2>&1 | 
sendmail service@jellico.com
30      5       1       *       *       root    periodic monthly 2>&1 | 
sendmail service@jellico.com
#

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

What's the best way to accomplish this?

Thanks,

Lisa Casey




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?012e01c6c6bd$29966ac0$d51a2cd0>