http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4854

           Summary: Received line mis-parsed when sendmail adds "for
                    <[EMAIL PROTECTED]>"
           Product: Spamassassin
           Version: 3.1.1
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P5
         Component: Libraries
        AssignedTo: [email protected]
        ReportedBy: [EMAIL PROTECTED]


In received.pm about line# 506 we have:

      if (/^from (\S+) /) {
        $rdns= $1;      # assume this is the rDNS, not HELO.  is this 
appropriate?
      }

In some cases, this is not appropriate, in my case, I'm trying to
catch the case of no rdns using the X-Spam-Relays-Untrusted meta
header.  In some cases (see below) The rdns= bit is being
populated with the helo on my system.

It has to do with sendmail adding "for <[EMAIL PROTECTED]>;" in some
received lines but not others.

Here's the X-Spam-Relays-Untrusted when run through spamassassin:

[3192] dbg: metadata: X-Spam-Relays-Untrusted: [ ip=58.66.128.145
rdns=eypeofflerle.net helo=eypeofflerle.net by=mx01.i-is.com ident=
[EMAIL PROTECTED] intl=0 id=k33C6UXr038269 auth= ]

Here is the actual received header:

Received: from eypeofflerle.net ([58.66.128.145])
        by mx01.i-is.com (8.12.11/8.12.11) with SMTP id k33C6UXr038269
        for <[EMAIL PROTECTED]>; Mon, 3 Apr 2006 08:06:44 -0400 (EDT)
        (envelope-from [EMAIL PROTECTED])



The set above includes the "for <[EMAIL PROTECTED]>;" in the header and the
rdns is not correct.



Here is a received line that works fine (notice the rdns= helo= bit)

[3836] dbg: metadata: X-Spam-Relays-Untrusted: [ ip=66.185.126.117 rdns=
helo=math.uni-muenster.de by=mx01.i-is.com ident=
[EMAIL PROTECTED] intl=0 id=k2FJqort087031 auth= ]

Here's the received header on this one:

Received: from math.uni-muenster.de ([66.185.126.117])
        by mx01.i-is.com (8.12.11/8.12.11) with ESMTP id k2FJqort087031;
        Wed, 15 Mar 2006 14:52:52 -0500 (EST)
        (envelope-from [EMAIL PROTECTED])

Other information on my system:

Here is a received header with rdns present.  it's after the helo,
between the ()'s before the [IP_ADDRESS] part.  When we have no rdns,
it shows up as just ([IP_ADDRESS]) as in the above examples.
        
Received: from uchoosem.com (207-36-31-72.ptr.primarydns.com [207.36.31.72])
        by mx01.i-is.com (8.12.11/8.12.11) with ESMTP id k32GfMBr059052
        for <[EMAIL PROTECTED]>; Sun, 2 Apr 2006 12:41:22 -0400 (EDT)
        (envelope-from [EMAIL PROTECTED])
        

Should I open a bz ticket on this one?

The only difference I can see is that my sendmail is adding:
"for <[EMAIL PROTECTED]>;" on some messages, and when it's present
everything is working fine, when that is missing
from the received header, received.pm is mis-parsing my header.
HTH!

At first I thought this was to do with MIMEDefang's 
option of $AddApparentlyToForSpamAssassin = 1; but this is not true, that's
adding the (envelope-from \S+) at the end of the received line.


It's possible this is fixed in 3.2 already, I just did a mass-check of this rule
using SpamAssassin version 3.2.0-r386260 and it seems to work as expected.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

Reply via email to