DOOM: High CPU and timeouts with "spamd child" and spamass-milter
So, in my ongoing series on Weird Problems Google Didn't Help With I give you the following problem.
Our trusty mail server has Postfix passing mail to spamass-milter. Alas, something goes wrong. Although logs show spamd returning a result postfix complains about connections timing out.
Logs point to a SMFIC_BODYEOB error. What the?
/var/spool/mail.log:
In my case it turns out that I'd made the mistake of having two OPTIONS lines in my /etc/default/spamass-milter file.
Having the two OPTIONS lines is fine, as long as you only want the last option - in this case not telling spamass-milter what default user to use or that it shouldn't check things originating from the local machine.
I'm not entirely sure why it causes spamd child to go haywire and eat up all the CPU for five minutes, but I'm glad it's stopped.
Our trusty mail server has Postfix passing mail to spamass-milter. Alas, something goes wrong. Although logs show spamd returning a result postfix complains about connections timing out.
Logs point to a SMFIC_BODYEOB error. What the?
/var/spool/mail.log:
Jun 27 19:26:02 myhost spamd[10058]: spamd: clean message (-2.9/5.0) for spamass-milter:117 in 7.1 seconds, 959 bytes.
Jun 27 19:26:02 myhost spamd[10058]: spamd: result: . -2 - ALL_TRUSTED,BAYES_00,TVD_SPACE_RATIO scantime=7.1,size=959,user=spamass-milter,uid=117,required_score=5.0,rhost=localhost,raddr=127.0.0.1,rport=42711,mid= ,bayes=0.000000,autolearn=ham
Jun 27 19:30:55 myhost postfix/cleanup[15798]: warning: milter unix:/spamass/spamass.sock: can't read SMFIC_BODYEOB reply packet header: Connection timed out
Jun 27 19:30:55 myhost postfix/qmgr[2757]: 8CD3F58: from= , size=1100, nrcpt=1 (queue active) Jun 27 19:30:55 myhost postfix/smtpd[15795]: disconnect from unknown[192.168.1.6]
In my case it turns out that I'd made the mistake of having two OPTIONS lines in my /etc/default/spamass-milter file.
OPTIONS="-u spamass-milter -i 127.0.0.1"
# Reject emails with spamassassin scores > 15.
#OPTIONS="-r 15"
OPTIONS="-r 15"
Having the two OPTIONS lines is fine, as long as you only want the last option - in this case not telling spamass-milter what default user to use or that it shouldn't check things originating from the local machine.
I'm not entirely sure why it causes spamd child to go haywire and eat up all the CPU for five minutes, but I'm glad it's stopped.
Comments
Post a Comment