You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by do...@apache.org on 2007/04/10 21:52:48 UTC

svn commit: r527265 - /spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/SPF.pm

Author: dos
Date: Tue Apr 10 12:52:47 2007
New Revision: 527265

URL: http://svn.apache.org/viewvc?view=rev&rev=527265
Log:
be a little more flexible with whitespace when re-using received-spf headers

Modified:
    spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/SPF.pm

Modified: spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/SPF.pm
URL: http://svn.apache.org/viewvc/spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/SPF.pm?view=diff&rev=527265&r1=527264&r2=527265
==============================================================================
--- spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/SPF.pm (original)
+++ spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/SPF.pm Tue Apr 10 12:52:47 2007
@@ -332,7 +332,7 @@
 
 	# http://www.openspf.org/RFC_4408#header-field
 	# wtf - for some reason something is sticking an extra space between the header name and field value
-	if ($hdr =~ /^received-spf:\s+(pass|neutral|(?:soft)?fail|none) (?:.* identity=(helo|m(?:ail)?from); )?/i) {
+	if ($hdr =~ /^received-spf:\s+(pass|neutral|(?:soft)?fail|none)\b(?:.*\bidentity=(helo|m(?:ail)?from)\b)?/i) {
 	  my $result = lc($1);
 
 	  my $identity = '';	# we assume it's a mfrom check if we can't tell otherwise