If you cannot wait for the fix to propagate this is how to fix it manually:
1) cd /usr/share/perl5/Mail/SpamAssassin/Plugin
2) patch -p0 SPF.pm < /tmp/patch1.patch
3) patch -p0 SPF.pm < /tmp/patch2.patch
4) patch -p0 SPF.pm < /tmp/patch3.patch
If you want the patches in files post your email to this thread.
/tmp/patch1.patch
--- spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/SPF.pm 2013/06/03 16:30:33 1489055
+++ spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/SPF.pm 2015/01/30 14:34:01 1656028
@@ -59,11 +59,15 @@
$self->register_eval_rule ("check_for_spf_none");
$self->register_eval_rule ("check_for_spf_fail");
$self->register_eval_rule ("check_for_spf_softfail");
+ $self->register_eval_rule ("check_for_spf_permerror");
+ $self->register_eval_rule ("check_for_spf_temperror");
$self->register_eval_rule ("check_for_spf_helo_pass");
$self->register_eval_rule ("check_for_spf_helo_neutral");
$self->register_eval_rule ("check_for_spf_helo_none");
$self->register_eval_rule ("check_for_spf_helo_fail");
$self->register_eval_rule ("check_for_spf_helo_softfail");
+ $self->register_eval_rule ("check_for_spf_helo_permerror");
+ $self->register_eval_rule ("check_for_spf_helo_temperror");
$self->register_eval_rule ("check_for_spf_whitelist_from");
$self->register_eval_rule ("check_for_def_spf_whitelist_from");
@@ -258,6 +262,18 @@
$scanner->{spf_softfail};
}
+sub check_for_spf_permerror {
+ my ($self, $scanner) = @_;
+ $self->_check_spf ($scanner, 0) unless $scanner->{spf_checked};
+ $scanner->{spf_permerror};
+}
+
+sub check_for_spf_temperror {
+ my ($self, $scanner) = @_;
+ $self->_check_spf ($scanner, 0) unless $scanner->{spf_checked};
+ $scanner->{spf_temperror};
+}
+
sub check_for_spf_helo_pass {
my ($self, $scanner) = @_;
$self->_check_spf ($scanner, 1) unless $scanner->{spf_helo_checked};
@@ -291,6 +307,18 @@
$scanner->{spf_helo_softfail};
}
+sub check_for_spf_helo_permerror {
+ my ($self, $scanner) = @_;
+ $self->_check_spf ($scanner, 1) unless $scanner->{spf_helo_checked};
+ $scanner->{spf_helo_permerror};
+}
+
+sub check_for_spf_helo_temperror {
+ my ($self, $scanner) = @_;
+ $self->_check_spf ($scanner, 1) unless $scanner->{spf_helo_checked};
+ $scanner->{spf_helo_temperror};
+}
+
sub check_for_spf_whitelist_from {
my ($self, $scanner) = @_;
$self->_check_spf_whitelist($scanner) unless $scanner->{spf_whitelist_from_checked};
@@ -524,6 +552,8 @@
$scanner->{spf_helo_none} = 0;
$scanner->{spf_helo_fail} = 0;
$scanner->{spf_helo_softfail} = 0;
+ $scanner->{spf_helo_permerror} = 0;
+ $scanner->{spf_helo_temperror} = 0;
$scanner->{spf_helo_failure_comment} = undef;
} else {
# SPF on envelope sender (where possible)
@@ -533,6 +563,8 @@
$scanner->{spf_none} = 0;
$scanner->{spf_fail} = 0;
$scanner->{spf_softfail} = 0;
+ $scanner->{spf_permerror} = 0;
+ $scanner->{spf_temperror} = 0;
$scanner->{spf_failure_comment} = undef;
}
@@ -679,6 +711,9 @@
elsif ($result eq 'none') { $scanner->{spf_helo_none} = 1; }
elsif ($result eq 'fail') { $scanner->{spf_helo_fail} = 1; }
elsif ($result eq 'softfail') { $scanner->{spf_helo_softfail} = 1; }
+ elsif ($result eq 'permerror') { $scanner->{spf_helo_permerror} = 1; }
+ elsif ($result eq 'temperror') { $scanner->{spf_helo_temperror} = 1; }
+ elsif ($result eq 'error') { $scanner->{spf_helo_temperror} = 1; }
if ($result eq 'fail') { # RFC 4408 6.2
$scanner->{spf_helo_failure_comment} = "SPF failed: $comment";
@@ -689,6 +724,8 @@
elsif ($result eq 'none') { $scanner->{spf_none} = 1; }
elsif ($result eq 'fail') { $scanner->{spf_fail} = 1; }
elsif ($result eq 'softfail') { $scanner->{spf_softfail} = 1; }
+ elsif ($result eq 'temperror') { $scanner->{spf_temperror} = 1; }
+ elsif ($result eq 'error') { $scanner->{spf_temperror} = 1; }
if ($result eq 'fail') { # RCF 4408 6.2
$scanner->{spf_failure_comment} = "SPF failed: $comment";
/tmp/patch2.patch
--- spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/SPF.pm 2015/01/30 14:34:01 1656028
+++ spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/SPF.pm 2015/02/09 12:17:46 1658380
@@ -228,6 +228,15 @@
$conf->{parser}->register_commands(\@cmds);
}
+
+=item has_check_for_spf_errors
+
+Adds capability check for "if can()" for check_for_spf_permerror, check_for_spf_temperror, check_for_spf_helo_permerror and check_for_spf_helo_permerror
+
+=cut
+
+sub has_check_for_spf_errors { 1 }
+
# SPF support
sub check_for_spf_pass {
my ($self, $scanner) = @_;
/tmp/patch3.patch
--- spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/SPF.pm 2015/02/09 12:17:46 1658380
+++ spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/SPF.pm 2015/02/09 15:15:56 1658431
@@ -733,6 +733,7 @@
elsif ($result eq 'none') { $scanner->{spf_none} = 1; }
elsif ($result eq 'fail') { $scanner->{spf_fail} = 1; }
elsif ($result eq 'softfail') { $scanner->{spf_softfail} = 1; }
+ elsif ($result eq 'permerror') { $scanner->{spf_permerror} = 1; }
elsif ($result eq 'temperror') { $scanner->{spf_temperror} = 1; }
elsif ($result eq 'error') { $scanner->{spf_temperror} = 1; }