Every time 0logwatch runs on one (only one) of my systems, it prints to stderr:
Ignoring header field "MIME-Version: 1.0"
Ignoring header field "Content-Transfer-Encoding: 7bit"
Ignoring header field "Content-Type: text/plain; charset="iso-8859-1""
That results in anacron sending a root e-mail each time. I can suppress it by adding "exec 2>/tmp/0logwatch" to the top, but it reverts with each update of the logwatch package. I can see in the logwatch perl script that it's setting $out_mime to the quoted strings, but all it ever seems to do with that is "print OUTFILE $out_mime if $out_mime;" so I don't understand why stderr is generated. Any guidance on how to suppress this persistently will be appreciated.
-output stdout -format text is probably what you want.
The default cron that we put in the install looks like this, you should change it to whatever you need.
#Set logwatch location
#Add options to this line. Most options should be defined in /etc/logwatch/conf/logwatch.conf,
#but some are only for the nightly cronrun such as -output mail and should be set here.
#Other options to consider might be "-format html" or "-encode base64", man logwatch for more details.
mtremaine, could you clarify? That's not the /etc/cron.daily/0logwatch default script, so I'm not sure what/where it is.
The problem with modifying the 0logwatch script to redirect stderr is that every time you update logwatch, my fix gets overwritten.
Found it. cron, per se, has nothing to do with it. In logwatch.conf, (/etc/logwatch/conf/logwatch.conf on Fedora), put
OPTIONS="-output stdout -format text"
To suppress the meaningless error messages from the regular report after doing that, in ignore.conf put:
^Ignoring header field.*$