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/10/14 00:00:12 UTC

[Bug 5684] New: patch to SPF.pm to add detection of "+all" in spf v1 records

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

           Summary: patch to SPF.pm to add detection of "+all" in spf v1
                    records
           Product: Spamassassin
           Version: 3.2.3
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P5
         Component: Plugins
        AssignedTo: dev@spamassassin.apache.org
        ReportedBy: andyk@slcpa.biz


A patch that adds two new tests (one each for 'helo' and 'mail from:' lookups)
to detect "+all" in the unparsed spf v1 record.  Patch tested only on Linux and
Perl 5.8.8.



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

[Bug 5684] patch to SPF.pm to add detection of "+all" in spf records

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





------- Additional Comments From mkettler_sa@verizon.net  2007-10-20 19:21 -------
Agreed, adding a pseudo-header would allow rule writers to do nearly anything
they wanted.

Of course, you'd probably need plugin code to detect all possible variants of
the ip4 ranges bypass. A plugin could bit-mask all the ip-4 blocks together and
see if it added up to 0/0. But that seems like a lot of work for something that
isn't likely to cause a problem. (unless someone does something foolish like
assign -5.0 to SPF_PASS.. but if it hurts when you shoot yourself in the foot,
don't get steel toed boots, stop shooting.)





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

[Bug 5684] patch to SPF.pm to add detection of "+all" in spf v1 records

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





------- Additional Comments From andyk@slcpa.biz  2007-10-13 15:03 -------
Created an attachment (id=4157)
 --> (http://issues.apache.org/SpamAssassin/attachment.cgi?id=4157&action=view)
The patch (beta qual) on SA 3.2.3 ver of SPF.pm

Patch introduces no changes to processing unless the associated rules are
active; all existing optimizations (like header checks for trusted relay's SPF
results) are maintained.  Patch preserves existing logic to choose between
Mail::SPF and Mail::SPF::Query (with a preference for the former).



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

[Bug 5684] patch to SPF.pm to add detection of "+all" in spf records

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





------- Additional Comments From felicity@apache.org  2007-10-20 17:04 -------
I also have to agree that I'm not really sure what the point is.  For something
like this though, I'd be tempted to have the plugin make a psuedo header w/ the
SPF text.  Then normal rules could be run against it w/out having to modify the
plugin for every little thing.

:)



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

[Bug 5684] patch to SPF.pm to add detection of "+all" in spf records

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





------- Additional Comments From andyk@slcpa.biz  2007-10-17 14:05 -------
(In reply to comment #1)
An update to the patch for minor bug fixes.




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

[Bug 5684] patch to SPF.pm to add detection of "+all" in spf records

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





------- Additional Comments From andyk@slcpa.biz  2007-10-23 13:38 -------
Matt, you and Theo are correct in that this is easily worked around.  I was
asked to work up something to catch this subversion of spf's intent, and this is
what I came up with.  At the time, about 3 weeks ago, Gareth was getting a lot
of spam from domains with "+all" records.  The intent was not to compensate for
reckless negative scoring for of spf pass but to use the "+all" record as a
clear indication that the domain owner intended to spam from that domain (using
any machine).  In the first few days of testing, I was astounded at the number
of domains it found.  Since then, the flow of 

I'd LOVE to see SPF.pm create a pseudo header containing the spf record (and
sender-id record), but that was way beyond my nascent abilities in Perl; so, I
didn't even attempt it.




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

[Bug 5684] patch to SPF.pm to add detection of "+all" in spf records

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





------- Additional Comments From mkettler_sa@verizon.net  2007-10-20 16:38 -------
Trivial workaround to continue to have a "+all" record without matching your rule:

ip4:0.0.0.0/1 ip4:128.0.0.0/1

More to the point, is it really a problem if someone does have a +all record? It
doesn't really help them at all from a SpamAssassin perspective..

Also, have you seen any +all records being used in the wild? Have they been
causing you trouble somehow? Or is this just a pre-emptive patch?



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

[Bug 5684] patch to SPF.pm to add detection of "+all" in spf records

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





------- Additional Comments From andyk@slcpa.biz  2007-10-15 11:52 -------
(In reply to comment #0)
> A patch that adds two new tests (one each for 'helo' and 'mail from:' lookups)
> to detect "+all" in the unparsed spf record.  Patch tested only on Linux and
> Perl 5.8.8.





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

[Bug 5684] patch to SPF.pm to add detection of "+all" in spf records

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


andyk@slcpa.biz changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
Attachment #4157 is|0                           |1
           obsolete|                            |




------- Additional Comments From andyk@slcpa.biz  2007-10-17 14:07 -------
Created an attachment (id=4165)
 --> (http://issues.apache.org/SpamAssassin/attachment.cgi?id=4165&action=view)
Patch update for minor bug fixes

Fixes error r/t undefined var in debug statement.  Fixes debug error with
$spf_record when $spf_record_object is undefined (and Mail::SPF is present).



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

[Bug 5684] patch to SPF.pm to add detection of "+all" in spf records

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





------- Additional Comments From andyk@slcpa.biz  2007-10-20 13:50 -------
I wish to thank Gareth Blades of the Linguaphone Group for his assistance in
coding the Perl for this patch.



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

[Bug 5684] patch to SPF.pm to add detection of "+all" in spf v1 records

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





------- Additional Comments From andyk@slcpa.biz  2007-10-13 15:04 -------
Created an attachment (id=4158)
 --> (http://issues.apache.org/SpamAssassin/attachment.cgi?id=4158&action=view)
The ruleset for the patch




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

[Bug 5684] patch to SPF.pm to add detection of "+all" in spf records

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


andyk@slcpa.biz changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|patch to SPF.pm to add      |patch to SPF.pm to add
                   |detection of "+all" in spf  |detection of "+all" in spf
                   |v1 records                  |records






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