So I did some digging, and by deliberately breaking the REGEX (adding NOMATCH to the middle of the line) I confirmed several things:

1. The line works properly on my system with the patch
2. If the line matches then ALL_TRUSTED is applied
3. ALL_TRUSTED does nothing to negate SPF checks

René Berber wrote:
Daryl C. W. O'Shea wrote:
[snip]
Sendmail should be putting a "(authenticated bits=0)" line in its
Received header when the user authenticates.  SA will automatically use
this to extend the trust path if the header above it is trusted.

Let's start by saying two things:

1) LOCAL_AUTH_RCVD doesn't do anything useful, just to clarify what happened to
the original subject.

2) SA 3.1.7 (and 3.1.5) doesn't seem to recognize Sendmail's authentication
under some circumstances.  I assume that it does recognize it for other
messages, even if I have not seen evidence to that effect.

If I change Received.pm, line 414, like this:

  # Sendmail, MDaemon, some webmail servers, and others
-  elsif (/^from .*?(?:\]\)|\)\]) .*?\(.*?authenticated.*?\).*? by/) {
+  elsif (/^from .*?(.*?authenticated.*?\).*? by/) {

It does recognize the authentication line I showed before, and the message is
not scored by Botnet which is what I wanted.

The relevant debug output:
...
[2932] dbg: received-header: parsed as [ ip=189.149.70.163
rdns=dsl-189-149-70-163.prod-infinitum.com.mx helo=MARISELA
by=mail.legosoft.com.mx ident= envfrom= intl=0 id=kB3G26P6019032 auth=Sendmail ]
[2932] dbg: received-header: relay 189.149.70.163 trusted? yes internal? yes
[2932] dbg: metadata: X-Spam-Relays-Trusted: [ ip=200.52.129.137
rdns=mail.legosoft.com.mx helo= by=cactus-soft.dyndns.org ident=
[EMAIL PROTECTED] intl=1 id=J9POUJ-0001MC-JY auth= ] [ ip=189.149.70.163
rdns=dsl-189-149-70-163.prod-infinitum.com.mx helo=MARISELA
by=mail.legosoft.com.mx ident= envfrom= intl=1 id=kB3G26P6019032 auth=Sendmail ]
...

The full path to the patched file is
/usr/lib/perl5/site_perl/5.8/Mail/SpamAssassin/Message/Metadata/Received.pm


--
Jo Rhett
Network/Software Engineer
Net Consonance

Reply via email to