Hi Ask et al,
Just installed qpsmtpd 0.26 and SpamAssassin 2.63 into an existing and debugged qmail
configuration.
Overall -- they're both working fine. (Many thanks to all the contributors!!)
However, when messages are flagged by spamd, some extra stuff is coming from spamd
that is messing up the plugin:
/home/smtpd/qpsmtpd/plugins/spamassassin:
while (<SPAMD>) {
warn "GOT FROM SPAMD1: $_"; ## <== I uncommented this for debugging
next unless m/\S/;
s/\r?\n$/\n/;
my @h = split /: /, $_, 2;
$transaction->header->add(@h) if @h == 2; ## <=== I added the if @h == 2 for
debugging
last if $h[0] eq "Spam" and $h[1] =~ m/^False/;
}
Here's a typical result of the above when run on a spam message:
Feb 5 00:55:05 henry smtpd: 1075971305.524014 GOT FROM SPAMD1: Spam: Yes ; 17.4 / 5.0?
Feb 5 00:55:05 henry qmail: 1075971305.576061 status: local 0/10 remote 1/20
Feb 5 00:55:05 henry smtpd: 1075971305.624446 GOT FROM SPAMD1: ?
Feb 5 00:55:05 henry smtpd: 1075971305.713005 GOT FROM SPAMD1: Spam detection
software, running on the system "henry.if.net", has
Feb 5 00:55:05 henry smtpd: 1075971305.757287 GOT FROM SPAMD1: identified this
incoming email as possible spam. The original message
Feb 5 00:55:05 henry smtpd: 1075971305.801608 GOT FROM SPAMD1: has been attached to
this so you can view it (if it isn't spam) or block
Feb 5 00:55:05 henry smtpd: 1075971305.888277 GOT FROM SPAMD1: similar future email.
If you have any questions, see
Feb 5 00:55:05 henry smtpd: 1075971305.979028 GOT FROM SPAMD1: [EMAIL PROTECTED] for
details.
Feb 5 00:55:06 henry smtpd: 1075971306.067214 GOT FROM SPAMD1:
Feb 5 00:55:06 henry smtpd: 1075971306.155771 GOT FROM SPAMD1: Content preview:
Spamnix has disabled this spam message's non-text MIME
Feb 5 00:55:06 henry smtpd: 1075971306.200043 18909 FATAL PLUGIN ERROR: Bad RFC822
field name 'Content preview'
Feb 5 00:55:06 henry smtpd: 1075971306.244318 at
/home/smtpd/qpsmtpd/plugins/spamassassin line 134
And the message does get the first header correctly:
Subject: Guaranteed 12%-50% Discount On All Prescription ...
X-SMTPD: qpsmtpd/0.26, http://develooper.com/code/qpsmtpd/
X-Spam-Check-By: henry.if.net
Spam: Yes ; 17.4 / 5.0
(but no others).
Glancing at the code for the plugin, it seems as if the plugin is expecting SPAMD to
only return lines that are in RFC822 Header: Content format; it splits them and then
adds each one as a header. As soon as it gets to the first thing that isn't a header
(in the example above: "Content preview" is not a legal header), qpsmtpd barfs.
As is clear from the debugging message, the daemon is not returning messages in the
format expected by the plugin, and so the plugin is barfing trying to add the illegal
headers.
Am I the only one seeing this? Does this plugin need to be patched?
TIA for any advice,
-chris