Date: Sun, 30 Aug 2015 08:29:27 -0400 From: Ernie Luzar <luzar722@gmail.com> To: =?UTF-8?B?0KDRg9GB0LvQsNC9INCR0YPRgNGF0LDQvdC+0LI=?= <r100500b@gmail.com> Cc: freebsd-questions <freebsd-questions@freebsd.org> Subject: Re: how to change daily cron emails to go to user account instead of root Message-ID: <55E2F727.2040804@gmail.com> In-Reply-To: <CAGzH002f-YFRMKweeBMvcLvkx1oxnsNMHTNPRJ%2B8rSCz4kxHBg@mail.gmail.com> References: <55DF057F.6040205@gmail.com> <55DF0C75.5000907@qeng-ho.org> <55DF0DB3.3040400@qeng-ho.org> <CAGzH002f-YFRMKweeBMvcLvkx1oxnsNMHTNPRJ%2B8rSCz4kxHBg@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Руслан Бурханов wrote: > man cron > > -m mailto > Overrides the default recipient for cron mail. Each > crontab(5) > without MAILTO explicitly set will send mail to the > mailto mail‐ > box. Sending mail will be disabled by default if mailto > set to a > null string, usually specified in a shell as '' or "". > > So you just can add this option on cron flags from rc.conf, like: > > cron_flags="-m 'root@mymail.com <mailto:root@mymail.com>'" > > and restart cron daemon. > snip This method seemed the simplest so I gave it a try. The host has a user account called bob. I want all cron email to go to bob and not root. I use postfix and sendmail is disabled. I put cron_flags="-m bob" in /etc/rc.conf and rebooted the host. Next morning the daily cron email still went to root. 1. Is there a way to scan rc.conf to verify all the included options are valid and accepted? 2. Since root and bob are on the same host is @mydomain really required? 3. Any ideas why it did not work and no errors were generated?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?55E2F727.2040804>