Add SPF config

tags/ipasserelle-base-0.2.65-1
Daniel Berteaud 11 years ago
parent e78c7d0ce3
commit b8f402bc86
  1. 5
      root/etc/e-smith/templates/var/service/qpsmtpd/config/peers/0/30check_spf
  2. 16
      root/etc/e-smith/templates/var/service/tinydns/root/data/85Spf

@ -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…
Cancel
Save