I have recently migrated to using lightweight opensmtpd on one of my boxes, which is configured to forward to another machine running postfix.
This appears to work great… except that logwatch, when run through cron, is unable to send email. Cron sends me an email (ironically through opensmtpd) with the following content:
When I run logwatch directly as root, it works fine – the email is sent as expected.
My understanding was that anacron was running the scripts in cron.daily as root, so I’m not sure what is going on here. Is this another systemd hardening thing? Selinux does not appear to be the issue, the permissions on /var/spool/smtpd/offline appear to be correct (matching the RPM), and the permissions on /usr/sbin/smtpctl are also fine.
Executing anacron -d -s -n -f cron.daily to force cron.daily to run immediately and in the foreground, and then monitoring the process tree for anacron, I can confirm that the processes are indeed running as root: