e-mail from cron

Bill Moran wmoran at collaborativefusion.com
Wed Aug 23 14:28:44 UTC 2006


In response to "Lisa Casey" <lisa at jellico.com>:

> to this:
> 
> # Perform daily/weekly/monthly maintenance.
> 1       3       *       *       *       root    periodic daily  2>&1 | sendmail service at jellico.com

This is a bad idea, mainly because (as you already know) it doesn't work :)

If you want to use that syntax above, use mail(1) instead of sendmail.

However, you might find it easier to just add the following line to the
top of the crontab:
MAILTO=service at jellico.com

Which will cause all mail generated by the jobs in that file to be sent
to the provided address.

-- 
Bill Moran
Collaborative Fusion Inc.


More information about the freebsd-questions mailing list