You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by bu...@bugzilla.spamassassin.org on 2007/07/17 13:54:44 UTC

[Bug 5563] New: 17 of the RDNS_DYNAMIC rules use order-dependent fields

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

           Summary: 17 of the RDNS_DYNAMIC rules use order-dependent fields
           Product: Spamassassin
           Version: SVN Trunk (Latest Devel Version)
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P5
         Component: Rules
        AssignedTo: dev@spamassassin.apache.org
        ReportedBy: henry@stern.ca


The rules in 20_dynrdns.cf look for dynamic-like RDNS patterns in the last
untrusted relay, excluding clients that have autenticated with SMTP+AUTH.  This
is typically implemented like:

header __RDNS_DYNAMIC_IPADDR X-Spam-Relays-Untrusted =~ /^[^\]]+
rdns=[a-z]\S*\d+[^\d\s]\d+[^\d\s]\d+[^\d\s]\d+[^\d\s][^\.]*\.\S+\.\S+[^\]]+ auth= /i

'^[^\]]+ ' ensures that the regex can only match the first untrusted relay.
'[^\]]+ auth= /' ensures that the first untrusted relay did not use SMTP+AUTH.

However, this second part is wrong.  According to Justin Mason, "the format of
X-Spam-Relays-Untrusted explicitly defines that consumers should not assume a
specific order of items."

[ ip=81.30.186.139 rdns=pptp-81-30-186-139.ufanet.ru
helo=pptp-81-30-186-139.ufanet.ru by=triscuit.stern.ca ident= envfrom= intl=0
id=l6HAgHqw011726 auth= msa=0 ]

We could fix this using something similar to .*, except that it is both slow and
still doesn't solve the problem (what if auth precedes rdns?).  A much better
solution that Justin and I have come up with is as follows:

Remove '[^\]] auth= ' from the end of all of the RDNS regexes.  Some of these
were missing already.  Whoops!  Add the following sub-rule:

header __LAST_UNTRUSTED_RELAY_NO_AUTH X-Spam-Relays-Untrusted =~ /^[^\]]+ auth= /

Modify the big meta rule:

meta RDNS_DYNAMIC   (__LAST_UNTRUSTED_RELAY_NO_AUTH && (*old RDNS_DYNAMIC rule*))



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

[Bug 5563] [review] 17 of the RDNS_DYNAMIC rules use order-dependent fields

Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5563


jm@jmason.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |DUPLICATE




------- Additional Comments From jm@jmason.org  2007-07-30 13:33 -------
this is a total mess; closing this bug in favour of a combined megapatch in bug
5397.

*** This bug has been marked as a duplicate of 5397 ***



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

[Bug 5563] [review] 17 of the RDNS_DYNAMIC rules use order-dependent fields

Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5563


jm@jmason.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
OtherBugsDependingO|                            |5397
              nThis|                            |






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

[Bug 5563] [review] 17 of the RDNS_DYNAMIC rules use order-dependent fields

Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5563


jm@jmason.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |
            Summary|17 of the RDNS_DYNAMIC rules|[review] 17 of the
                   |use order-dependent fields  |RDNS_DYNAMIC rules use
                   |                            |order-dependent fields
  Status Whiteboard|                            |needs 2 votes
   Target Milestone|Undefined                   |3.2.3




------- Additional Comments From jm@jmason.org  2007-07-17 05:55 -------
reopening for 3.2.x



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

[Bug 5563] 17 of the RDNS_DYNAMIC rules use order-dependent fields

Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5563





------- Additional Comments From jm@jmason.org  2007-07-17 05:55 -------
Created an attachment (id=4051)
 --> (http://issues.apache.org/SpamAssassin/attachment.cgi?id=4051&action=view)
backported to 3.2.x

here's a patch for review against 3.2.x's version of that rules file...



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

[Bug 5563] [review] 17 of the RDNS_DYNAMIC rules use order-dependent fields

Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5563


jm@jmason.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
OtherBugsDependingO|                            |5564
              nThis|                            |






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

[Bug 5563] 17 of the RDNS_DYNAMIC rules use order-dependent fields

Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5563


henry@stern.ca changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




------- Additional Comments From henry@stern.ca  2007-07-17 04:57 -------
Sending        rules/20_dynrdns.cf
Transmitting file data .
Committed revision 556893.




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