parent
8dfcf0d611
commit
f0b7be3e8b
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