[pmg-devel] [PATCH pmg-api] Fix #2224: override reference to openspf.org
Stoiko Ivanov
s.ivanov at proxmox.com
Thu Aug 29 17:39:34 CEST 2019
This is a fix for a small cosmetic issue, which keeps coming up on our various
support-channels:
pmgpolicy as user of 'Mail::SPF::Server' logs lines referencing the (now
defunct) url: http://www.openspf.org/Why
By overriding 'default_authority_explanation' [0] the logs now simply contain:
'Rejected by SPF record'.
Given that we are (by far) not the only users of this module I additionally
opened an issue upstream [1] (and linked it to the debian bug-report [2]).
Tested by providing a SPF policy not allowing the ip of the sender in my
testsetup and observing the logs.
[0] https://metacpan.org/pod/Mail::SPF::Server
[1] https://rt.cpan.org/Public/Bug/Display.html?id=130413
[2] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=930032
Signed-off-by: Stoiko Ivanov <s.ivanov at proxmox.com>
---
src/bin/pmgpolicy | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/pmgpolicy b/src/bin/pmgpolicy
index 59d28f7..836fa9d 100755
--- a/src/bin/pmgpolicy
+++ b/src/bin/pmgpolicy
@@ -377,7 +377,8 @@ sub child_init_hook {
$self->{dns_resolver} = Net::DNS::Resolver->new(%dnsargs);
$self->{spf_server} = Mail::SPF::Server->new(
- hostname => $self->{fqdn}, dns_resolver => $self->{dns_resolver});
+ hostname => $self->{fqdn}, dns_resolver => $self->{dns_resolver},
+ default_authority_explanation => 'Rejected by SPF record');
};
if (my $err = $@) {
$self->log(0, $err);
--
2.20.1
More information about the pmg-devel
mailing list