parent
e78c7d0ce3
commit
b8f402bc86
2 changed files with 21 additions and 0 deletions
@ -0,0 +1,5 @@ |
||||
{ |
||||
my $spf = $qpsmtpd{'CheckSPF'} || 'disabled'; |
||||
return '' unless ($spf =~ m/^[012]$/); |
||||
return "sender_permitted_from spf_deny $spf"; |
||||
} |
@ -0,0 +1,16 @@ |
||||
{ |
||||
if (($qpsmtpd{RejectSpoofedLocalDomains} || 'disabled') eq 'enabled'){ |
||||
$OUT .= "# SPF entries for local domains\n"; |
||||
my $allowed = ''; |
||||
foreach my $ip ( split /[;,]/, ($qpsmtpd{AllowedRemoteIP} || '')){ |
||||
my $allowed .= 'ip4\072'.$ip.' '; |
||||
} |
||||
foreach my $domain (get_domains()){ |
||||
$OUT .= "'$domain:v=spf1 mx $allowed-all:3600\n"; |
||||
$OUT .= ":$domain:99:\041v=spf1 mx $allowed-all:3600\n"; |
||||
} |
||||
} |
||||
else{ |
||||
$OUT .= "\n"; |
||||
} |
||||
} |
Loading…
Reference in new issue