spamassassin-dev August 2011 archive
Main Archive Page > Month Archives  > spamassassin-dev archives
spamassassin-dev: [Bug 6645] Problem with detection of authentic

[Bug 6645] Problem with detection of authenticated mails coming from servers running qmail-scanner

From: <bugzilla-daemon_at_nospam>
Date: Mon Aug 08 2011 - 21:31:00 GMT
To: dev@spamassassin.apache.org

https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6645

--- Comment #20 from spamassassinbugs@htl-leonding.ac.at 2011-08-08 21:31:00 UTC ---
(In reply to comment #14)
> Created attachment 4945 [details]
> Draft at which place the correct code has to be inserted
>
> The patch works, but surely doesn't work correctly, because the $envfrom ...
> lines were copied from a different regex occuring later in the Received.pm

Testing shows that the patch seems to work correctly, because the regex tries
to extract the part in the brackets of envelope-from and as there are no other
brackets in the header extraction works correctly.

You might have to convert the patch-file from DOS-format to Unix-format (use
dos2unix or something like that to fix line endings) to be able to use "patch
-p0 < patchfile" in the directory where Received.pm resides.

For Spamassassin 3.3.2 the line
@@ -857,6 +857,13 @@
would have to be replaced by
@@ -861,6 +861,13 @@

But as this is a unified patch-file patch will be happily patching even this
version correctly :-)

Summary:
Received.pm already contains code for handling qmail-scanner
from 188.45.128.1 by firstmail... with qmail-scanner ...
but doesn't correctly handle the header
from 188.45.128.1 (user@domain.local@188.45.128.1) by firstmail... with
qmail-scanner ...
which is created by current qmail-scanner versions when authentication has been
used, the patch fixes that.

The patch can be improved by moving the old qmail-scanner handling code at the
correct line (where now the patch inserts its code) and by telling perl that
the expression \(.{0,100}\) might be 0..1 time between the \S+ by \S+ ...

Then there would be no change in the number of lines in the Received.pm, but
only an improvement for the current expression and a reordering of the rules,
so that the expression can match.

-- Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.