You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Giles Malet <gd...@uwaterloo.ca> on 2009/08/07 22:51:30 UTC

Bug: spamc truncating lines in spamc.conf & failing miserably thereafter

I'm heading off on vacation in moments, but didn't want this to get 
lost, as it cost me hours of work to find!

This on:
Red Hat Enterprise Linux AS release 4 (Nahant Update 7)
Red Hat Enterprise Linux Server release 5.3 (Tikanga)
spamassassin-3.2.5-1.el4.rf
spamassassin-3.2.5-1.el5.rf

If one puts the following two lines into spamc.conf (the second may wrap):

-H
-d 
localhost,mailchk-w05-internal,mailchk-w04-internal,mailchk-w01-internal,mailchk-w02-internal,mailchk-m01-internal,mailchk-m02-internal,mailchk-m03-internal,mailchk-m04-internal,mailchk-m05-internal

Then one finds this in the syslog:

spamc[5471]: getaddrinfo(ma) failed: Name or service not known

.. and user preferences were not being processed (this all started with 
a report that whitelisting wasn't working). Well, I'm not sure what it 
was doing, but it wasn't the correct thing.

It appears that spamc reads exactly 95 bytes from that line, and 
silently truncates the input. Turns out that the last thing in the 
buffer is `..,ma' -- thus the failed DNS lookups on `ma', and subsequent 
lossage. It would be better if spamc actually took note of a full 
buffer, and at least backed up to the prior separator, and at least 
logged this, or did something more sane than causing user preferences to 
stop working!

Thanks, and apologies for perhaps not doing this properly. I can't see 
anything in bugzilla, but may have missed it in my rush.

gdm