spf-discuss
[Top] [All Lists]

"pass" vs "SPF-pass" in the Received-SPF line

2004-01-07 10:44:45
sendmail-milter-spf-1.1.pl from spf.pobox.com adds a "Received-SPF"
header so spam sorters can take the spf outcome into account
appropriately.

Unfortunately bogofilter and probably many other bayesian spam filters
just look at individual words in the header.  This implies that if the
header is "Received-SPF: pass", then bogofilter sees in its unordered
bag of vocabulary words "Received-SPF" (which is meaningless because
it is always present) and "pass" (which is not very meaningful,
because that might be there if lots of other tests pass).

Here's a patch that changes the word "pass" to "SPF-pass", which
bogofilter (probably among others) recognizes as one token and can
learn from effectively.  I'm proposing 

Hmm, it would make sense to consider changing the RFC for this.  

It would also make sense to consider changing bogofilter so it
remembers which word came from which header field.  The right path
probably depends on the most common behavior among the present crop of
spam filters, which I don't know.

The spammers may eventually start having words like "SPF-pass" in
their subject line.

--- sendmail-milter-spf-1.1.pl~ Tue Jan  6 17:45:28 2004
+++ sendmail-milter-spf-1.1.pl  Wed Jan  7 10:42:06 2004
@@ -205,7 +205,7 @@
     # prepend the new Received-SPF header.
 
     if ($priv_data->{'spf_result'}) {
-        $ctx->addheader('Received-SPF', $priv_data->{'spf_result'} . ' (' . 
$priv_data->{'spf_header_comment'} . ')');
+        $ctx->addheader('Received-SPF', "SPF-".$priv_data->{'spf_result'} . ' 
(' . $priv_data->{'spf_header_comment'} . ')');
     }
 
     $ctx->setpriv($priv_data);

-- 
Tim Freeman                                                  
tim(_at_)fungible(_dot_)com
I xeroxed a mirror. Now I have an extra xerox machine. -- Steven Wright

-------
Sender Permitted From: http://spf.pobox.com/
Archives at http://archives.listbox.com/spf-discuss/current/
Latest draft at http://spf.pobox.com/draft-mengwong-spf-02.9.4.txt
To unsubscribe, change your address, or temporarily deactivate your 
subscription, 
please go to 
http://v2.listbox.com/member/?listname(_at_)©#«Mo\¯HÝÜîU;±¤Ö¤Íµø?¡


<Prev in Thread] Current Thread [Next in Thread>