Random header image

December, 2018:

Getting Postfix working for outbound emails via SMTP and local relay for cron reports

I recently had to diagnose a couple of servers running Postfix which emailed results of rsync cronjobs when they returned a non-OK value. While Postfix was emailing the recipients on rsync failure, I noticed that the cronjob STDOUT was not being locally relayed correctly to the root mail.

I documented my fix on ServerFault, hopefully it's useful for someone else.

Having fixed local root cron reports, I then noticed on the CentOS7 box that the AIDE service was running, had been scanning for integrity checks against the original postfix install (subsequently upgraded to Postfix 3) and as such was throwing errors every night for no real reason, quite annoying.

To fix this I tried running aide --update but it didn't work (probably my fault from doing an --init first). I had to rm the /var/lib/aide/aide.db.gz and /var/lib/aide/aide.db.new.gz files, then run aide --init and rename the newly-made aide.db.new.gz to aide.db.gz. After that, it was happy.

I footnotes