Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Aug 2015 14:16:35 +0100
From:      Arthur Chance <freebsd@qeng-ho.org>
To:        Ernie Luzar <luzar722@gmail.com>, freebsd-questions@freebsd.org
Subject:   Re: how to change daily cron emails to go to user account instead of root
Message-ID:  <55DF0DB3.3040400@qeng-ho.org>
In-Reply-To: <55DF0C75.5000907@qeng-ho.org>
References:  <55DF057F.6040205@gmail.com> <55DF0C75.5000907@qeng-ho.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 27/08/2015 14:11, Arthur Chance wrote:
> On 27/08/2015 13:41, Ernie Luzar wrote:
>> Hello list;
>>
>> 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?
>
>
> Only change MAILTO in the crontab if you wish *all* root's cron output
> to go to another user.

Ack, misread because I was in the middle of dealing with periodic.conf. 
Ignore the following. The setting goes at the top of the crontab, on a 
line by itself.


> If you just want periodic output to go to a different place, you need to
> change the periodic.conf variables {daily,weekly,monthly}_output and
> {daily,weekly,monthly}_security_output. Probably the best way of doing
> that is to add the following to /etc/periodic.conf
>
> # set this next line to whatever mail address you want
> daily_output="user@dom.ain"
> weekly_output="$daily_output"
> monthly_output="$daily_output"
> daily_security_output="$daily_output"
> weekly_security_output="$daily_output"
> monthly_security_output="$daily_output"
>
> If you do it that way you only have to change one mail address in the
> future if you want to change the target address.
>


-- 
Those who do not learn from computing history are doomed to
GOTO 1



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?55DF0DB3.3040400>