Since I upgraded to Civi 5.11 (from 4.7) I am seeing empty emails from the cron daemon every time it runs the scheduled jobs. Previously I have only had emails when there has been some issue with the cron or what looks like an error from one of the scheduled jobs. The scheduled jobs look to all be fine in the log.
The problem is that it would hide any genuine error messages as I'm not going to go through all these emails.
Running on Wordpress 5.1.1 hosted on Siteground.
Update: I still want to resolve this. Part of the problem is I don't know where the messages with some content are coming from - they are all
"/usr/sbin/sendmail: unexpected response 501 to RCPT TO command"
I don't know exactly what they mean, but they did relate to a genuine problem with delivering mail. So I'd like to keep them. But they are few and far between and I haven't seen one for ages (maybe because there haven't been any bulk mailings). If I divert stdout to /dev/null will I lose the good as well as the bad. Not sure how to test it.
od
then you can confirm if that's what's happening, e.g.your-cron-command | od -c
. It might be something like an extra blank line was added in your wp-config file or civicrm.settings.php.your-cron-command | grep "."
, which will remove all blank lines from the output, so if the output is just a newline then after it will be completely empty and not send an email as normal. In some hosting control panels you might need to backslash the pipe character, or create a wrapper script and have cron call that script.