F20 - Unintended consequences of no default MTA - How best to fix

Chris Murphy lists at colorremedies.com
Thu Jan 2 20:29:46 UTC 2014


On Jan 2, 2014, at 12:55 PM, "Lars E. Pettersson" <lars at homer.se> wrote:

> On 01/02/2014 08:45 PM, Chris Murphy wrote:
>>>> Is there something you expect to see that is missing from the journal?
>>> 
>>> Yes, the output of cron, that is not a part of the journal output.
>> 
>> Then cron is broken.
> 
> cron by default sends the output to root
> 
> $ head /etc/crontab
> SHELL=/bin/bash
> PATH=/sbin:/bin:/usr/sbin:/usr/bin
> MAILTO=root
> 
> From 'man cron':
> 
> "When executing commands, any output is mailed to the owner of the crontab (or to the  user  specified  in  the MAILTO  environment variable in the crontab, if such exists)."
> 
> It also states:
> 
> "Any job output can also be sent to syslog by using the -s option."
> 
> The problem with that option is that the output from cron can voluminous, and voluminous messages are better suited as mails.

It seems that cron could have log levels like most other processes do, with a sensible default, and send that to the journal - while tagging each message sent with a proper priority, so that it can be properly filtered with journalctl -p -u.

The burden is on cron to modernize. Or it's users can stick with its implied workflow and install an MTA manually. I don't see why the majority should have something installed that isn't ever used for any benefit by default, let alone why they should be spammed by their computer by default.

Chris Murphy


More information about the users mailing list