Google Analytics

Friday, May 15, 2009

Fixing the infamous Amavis + SpamAssassin cron messages

I'm using Amavis and SpamAssassin together on an Ubuntu server. For some reason, a cron email was being generated every 3 hours that looked like this:

bayes: synced databases from journal in 0 seconds: 811 unique entries (1420 total entries)

There is a bug report filed about it here but the solution didn't help me.

The file responsible for generating this message is /usr/sbin/amavisd-new-cronjob. I was able to stop the annoying messages by changing line 26 from:
exec ${CMD}
exec ${CMD} >/dev/null 2>&1
While this may clobber useful error messages as well, my care factor is low after being spammed so much.


Andrew Perry said...

Thanks Mike - just googled this issue and found your post!

Thanks for sharing your wisdom as always!

Matt Brewster said...

I was having this issue as well, and this post fixed it - many thanks :)

John Clarke said...

I found this page via Google when I had the same problem after updating spamassassin and couldn't remember how I fixed it in the older version. I wasn't happy about discarding all output so I figured out why it was happening and fixed it again, and this time I posted the patch as a comment on the bug you linked to:

Hopefully I'll remember I did that when the next spamassassin upgrade comes out and the emails start coming again :-)