Subject: Re: Stop cron from mailing to root
To: Peter Seebach <netbsd-help@netbsd.org>
From: Jeff Flowers <jeffrey@jeffreyf.net>
List: netbsd-help
Date: 11/01/2002 09:15:56
> You can't easily; it will always send the output of a
> command if there is any. You probably ought to alias
> root to the sysadmin's account, that reduces the annoyance
> substantially.
According to the crontab(5) manpage:
"In addition to LOGNAME, HOME, and SHELL, cron(8) will look
at MAILTO if it has any reason to send mail as a result of
running commands in ``this'' crontab. If MAILTO is
defined (and non-empty), mail is sent to the user so
named. If MAILTO is defined but empty (MAILTO=""), no
mail will be sent. Otherwise mail is sent to the owner of
the crontab."
So you just need to edit root's crontab.
Jeff Flowers
jeffrey@jeffreyf.net