Remove logging of queue ID - It's virtually never available and just clutters logs.
This commit is contained in:
parent
291238fe73
commit
2f5a4ff1ba
1 changed files with 17 additions and 17 deletions
|
|
@ -170,7 +170,7 @@ while (<STDIN>) {
|
|||
}
|
||||
}
|
||||
|
||||
syslog(info => "%s: Policy action=%s", $attr{queue_id} || '<UNKNOWN>', $action || '<UNKNOWN>');
|
||||
syslog(info => "Policy action=%s", $action || '<UNKNOWN>');
|
||||
|
||||
STDOUT->print("action=$action\n\n");
|
||||
%attr = ();
|
||||
|
|
@ -239,8 +239,8 @@ sub sender_policy_framework {
|
|||
my $errmsg = $@;
|
||||
$errmsg = $errmsg->text if UNIVERSAL::isa($@, 'Mail::SPF::Exception');
|
||||
syslog(
|
||||
info => "%s:HELO check failed - Mail::SPF->new(%s, %s, %s) failed: %s",
|
||||
$attr->{queue_id} || '<UNKNOWN>', $attr->{client_address} || '<UNKNOWN>',
|
||||
info => "HELO check failed - Mail::SPF->new(%s, %s, %s) failed: %s",
|
||||
$attr->{client_address} || '<UNKNOWN>',
|
||||
$attr->{sender} || '<UNKNOWN>', $attr->{helo_name} || '<UNKNOWN>',
|
||||
$errmsg || '<UNKNOWN>'
|
||||
);
|
||||
|
|
@ -258,8 +258,8 @@ sub sender_policy_framework {
|
|||
|
||||
if ($VERBOSE) {
|
||||
syslog(
|
||||
info => "%s: SPF %s: HELO/EHLO: %s, IP Address: %s, Recipient: %s",
|
||||
$attr->{queue_id} || '<UNKNOWN>', $helo_result || '<UNKNOWN>',
|
||||
info => "SPF %s: HELO/EHLO: %s, IP Address: %s, Recipient: %s",
|
||||
$helo_result || '<UNKNOWN>',
|
||||
$attr->{helo_name} || '<UNKNOWN>', $attr->{client_address} || '<UNKNOWN>',
|
||||
$attr->{recipient} || '<UNKNOWN>'
|
||||
);
|
||||
|
|
@ -269,24 +269,24 @@ sub sender_policy_framework {
|
|||
# be accepted. Use the HELO result and return for null sender.
|
||||
if ($helo_result->is_code('fail')) {
|
||||
syslog(
|
||||
info => "%s: SPF %s: HELO/EHLO: %s",
|
||||
$attr->{queue_id} || '<UNKNOWN>', $helo_result || '<UNKNOWN>',
|
||||
info => "SPF %s: HELO/EHLO: %s",
|
||||
$helo_result || '<UNKNOWN>',
|
||||
$attr->{helo_name} || '<UNKNOWN>'
|
||||
);
|
||||
return "550 $helo_authority_exp";
|
||||
}
|
||||
elsif ($helo_result->is_code('temperror')) {
|
||||
syslog(
|
||||
info => "%s: SPF %s: HELO/EHLO: %s",
|
||||
$attr->{queue_id} || '<UNKNOWN>', $helo_result || '<UNKNOWN>',
|
||||
info => "SPF %s: HELO/EHLO: %s",
|
||||
$helo_result || '<UNKNOWN>',
|
||||
$attr->{helo_name} || '<UNKNOWN>'
|
||||
);
|
||||
return "DEFER_IF_PERMIT SPF-Result=$helo_local_exp";
|
||||
}
|
||||
elsif ($attr->{sender} eq '') {
|
||||
syslog(
|
||||
info => "%s: SPF %s: HELO/EHLO (Null Sender): %s",
|
||||
$attr->{queue_id} || '<UNKNOWN>', $helo_result || '<UNKNOWN>',
|
||||
info => "SPF %s: HELO/EHLO (Null Sender): %s",
|
||||
$helo_result || '<UNKNOWN>',
|
||||
$attr->{helo_name} || '<UNKNOWN>'
|
||||
);
|
||||
return "PREPEND $helo_spf_header"
|
||||
|
|
@ -317,8 +317,8 @@ sub sender_policy_framework {
|
|||
my $errmsg = $@;
|
||||
$errmsg = $errmsg->text if UNIVERSAL::isa($@, 'Mail::SPF::Exception');
|
||||
syslog(
|
||||
info => "%s: Mail From (sender) check failed - Mail::SPF->new(%s, %s, %s) failed: %s",
|
||||
$attr->{queue_id} || '<UNKNOWN>', $attr->{client_address} || '<UNKNOWN>',
|
||||
info => "Mail From (sender) check failed - Mail::SPF->new(%s, %s, %s) failed: %s",
|
||||
$attr->{client_address} || '<UNKNOWN>',
|
||||
$attr->{sender} || '<UNKNOWN>', $attr->{helo_name} || '<UNKNOWN>', $errmsg || '<UNKNOWN>'
|
||||
);
|
||||
return;
|
||||
|
|
@ -335,8 +335,8 @@ sub sender_policy_framework {
|
|||
|
||||
if ($VERBOSE) {
|
||||
syslog(
|
||||
info => "%s: SPF %s: Envelope-from: %s, IP Address: %s, Recipient: %s",
|
||||
$attr->{queue_id} || '<UNKNOWN>', $mfrom_result || '<UNKNOWN>',
|
||||
info => "SPF %s: Envelope-from: %s, IP Address: %s, Recipient: %s",
|
||||
$mfrom_result || '<UNKNOWN>',
|
||||
$attr->{sender} || '<UNKNOWN>', $attr->{client_address} || '<UNKNOWN>',
|
||||
$attr->{recipient} || '<UNKNOWN>'
|
||||
);
|
||||
|
|
@ -344,8 +344,8 @@ sub sender_policy_framework {
|
|||
|
||||
# Same approach as HELO....
|
||||
syslog(
|
||||
info => "%s: SPF %s: Envelope-from: %s",
|
||||
$attr->{queue_id} || '<UNKNOWN>', $mfrom_result || '<UNKNOWN>',
|
||||
info => "SPF %s: Envelope-from: %s",
|
||||
$mfrom_result || '<UNKNOWN>',
|
||||
$attr->{sender} || '<UNKNOWN>'
|
||||
);
|
||||
if ($mfrom_result->is_code('fail')) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue