Mike,

> > > Have had a few messages getting through lately that should have been
> > > tagged as spam but appear not to have the subject line tagged.
> [...]
> The problem seems to be that for this message (and this particular message
> only) that Amavisd is not adding the spam tag to the existing subject line,
> but rather creating a 2nd subject line with the SPAM tag in it.
>
> I have no clue about the mail headers and how Amavisd parses them, but I'd
> take a wild guess that the two colons at the start of the original subject
> line are somehow confusing Amavisd.

You are quite right, it is an ugly bug, the header field is saved under an
incorrect name and later not found when tag is to be inserted into Subject,
so a new one is entered. Here is a fix (diff against 2.5.3, likely to apply
to earlier versions as well):

--- amavisd~    2008-01-28 20:29:31.000000000 +0100
+++ amavisd     2008-01-28 20:30:13.000000000 +0100
@@ -10712,5 +10712,5 @@
     if ($ln =~ /^[ \t]/) {  # header field continuation
       $orig_header_fields->{$collecting} .= $ln  if defined $collecting;
-    } elsif ($ln =~ /^([^ \t]+)[ \t]*:(.*)\z/xsi &&
+    } elsif ($ln =~ /^([^: \t]+)[ \t]*:(.*)\z/xsi &&
             $collectable_header_fields{lc($1)}) {
       $collecting = lc($1);


Mark

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
AMaViS-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/

Reply via email to