how to change daily cron emails to go to user account instead of root
Matthew Seaman
m.seaman at infracaninophile.co.uk
Thu Aug 27 12:53:31 UTC 2015
On 2015/08/27 13:41, Ernie Luzar wrote:
> How do I change the daily cron emails to go to user account instead of
> root? I don't want any cron email going to root any more.
>
> man 5 crontab says the cron environment variable MAILTO = "account user
> name" is way to change the cron email from the default of "root" to the
> "account user name" you want.
>
> The part that is not clear is where do I place this MAILTO environment
> variable? Do I edit /etc/crontab and pace it next to the PATH variable
> or maybe in /etc/periodic.conf or /etc/csh.cshrc or /boot/loader.conf?
Add:
daily_output="email at addr.ess"
to /etc/periodic.conf
Or you can give it a file name and it will write the output there --
/var/log/daily.log is recommended as it's already set up to be rotated
by newsyslog(8)
Matthew
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 972 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20150827/954565b4/attachment.bin>
More information about the freebsd-questions
mailing list