* Change reject reply to 550 for RFC 2821 complianse.
* Clarified wording for some verbose logging. * Added more information about HELO checking to README
This commit is contained in:
parent
8f82cbeb7c
commit
f876c707b9
4 changed files with 60 additions and 27 deletions
|
|
@ -43,7 +43,7 @@ my @HANDLERS = (
|
|||
}
|
||||
);
|
||||
|
||||
my $VERBOSE = 0;
|
||||
my $VERBOSE = 1;
|
||||
|
||||
my $DEFAULT_RESPONSE = 'DUNNO';
|
||||
|
||||
|
|
@ -159,7 +159,7 @@ sub sender_policy_framework {
|
|||
my $errmsg = $@;
|
||||
$errmsg = $errmsg->text if UNIVERSAL::isa($@, 'Mail::SPF::Exception');
|
||||
syslog(
|
||||
info => "%s: Mail::SPF->new(%s, %s, %s) failed: %s",
|
||||
info => "%s:HELO check failed - Mail::SPF->new(%s, %s, %s) failed: %s",
|
||||
$attr->{queue_id}, $attr->{client_address}, $attr->{sender}, $attr->{helo_name}, $errmsg
|
||||
);
|
||||
return "DUNNO";
|
||||
|
|
@ -183,7 +183,7 @@ sub sender_policy_framework {
|
|||
# Reject on HELO fail. Defer on HELO temperror if message would otherwise
|
||||
# be accepted. Use the HELO result and return for null sender.
|
||||
if ($helo_result->is_code('fail')) {
|
||||
return "REJECT $helo_authority_exp";
|
||||
return "550 $helo_authority_exp";
|
||||
}
|
||||
elsif ($helo_result->is_code('temperror')) {
|
||||
return "DEFER_IF_PERMIT SPF-Result=$helo_local_exp";
|
||||
|
|
@ -207,7 +207,7 @@ sub sender_policy_framework {
|
|||
my $errmsg = $@;
|
||||
$errmsg = $errmsg->text if UNIVERSAL::isa($@, 'Mail::SPF::Exception');
|
||||
syslog(
|
||||
info => "%s: Mail::SPF->new(%s, %s, %s) failed: %s",
|
||||
info => "%s: Mail From (sender) check failed - Mail::SPF->new(%s, %s, %s) failed: %s",
|
||||
$attr->{queue_id}, $attr->{client_address}, $attr->{sender}, $attr->{helo_name}, $errmsg
|
||||
);
|
||||
return "DUNNO";
|
||||
|
|
@ -231,7 +231,7 @@ sub sender_policy_framework {
|
|||
|
||||
# Same approach as HELO....
|
||||
if ($mfrom_result->is_code('fail')) {
|
||||
return "REJECT $mfrom_authority_exp";
|
||||
return "550 $mfrom_authority_exp";
|
||||
}
|
||||
elsif ($mfrom_result->is_code('temperror')) {
|
||||
return "DEFER_IF_PERMIT SPF-Result=$mfrom_local_exp";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue