distinguish rejecting versus tolerated failures

This commit is contained in:
Matt Simerson 2013-04-24 16:25:31 -04:00
parent 06ebd12e06
commit bbc6e895cc
5 changed files with 7 additions and 6 deletions

View File

@ -224,7 +224,7 @@ sub get_reject {
my $reject = $self->{_args}{reject}; my $reject = $self->{_args}{reject};
if (defined $reject && !$reject) { if (defined $reject && !$reject) {
$self->log(LOGINFO, "fail, reject disabled" . $log_mess); $self->log(LOGINFO, "fail, tolerated" . $log_mess);
return DECLINED; return DECLINED;
} }

View File

@ -314,6 +314,7 @@ sub show_symbol {
return ' o' if $mess eq 'TLS setup returning'; return ' o' if $mess eq 'TLS setup returning';
return ' o' if $mess eq 'pass'; return ' o' if $mess eq 'pass';
return ' -' if $mess eq 'skip'; return ' -' if $mess eq 'skip';
return ' x' if 'fail, tolerated' eq substr($mess, 0, 15);
return ' X' if $mess eq 'fail'; return ' X' if $mess eq 'fail';
return ' -' if $mess =~ /^skip[,:\s]/i; return ' -' if $mess =~ /^skip[,:\s]/i;
return ' o' if $mess =~ /^pass[,:\s]/i; return ' o' if $mess =~ /^pass[,:\s]/i;

View File

@ -246,7 +246,7 @@ sub helo_handler {
my ($self, $transaction, $host) = @_; my ($self, $transaction, $host) = @_;
if (!$host) { if (!$host) {
$self->log(LOGINFO, "fail, no helo host"); $self->log(LOGINFO, "fail, tolerated, no helo host");
return DECLINED; return DECLINED;
} }

View File

@ -116,7 +116,7 @@ sub hook_mail {
return Qpsmtpd::DSN->temp_resolver_failed($self->get_reject_type(), return Qpsmtpd::DSN->temp_resolver_failed($self->get_reject_type(),
''); '');
} }
$self->log(LOGINFO, 'fail, missing result, reject disabled'); $self->log(LOGINFO, 'fail, tolerated, missing result');
return DECLINED; return DECLINED;
}; };
@ -127,7 +127,7 @@ sub hook_mail {
if (!$self->{_args}{reject}) { if (!$self->{_args}{reject}) {
; ;
$self->log(LOGINFO, "fail, reject disabled, $result"); $self->log(LOGINFO, "fail, tolerated, $result");
return DECLINED; return DECLINED;
} }

View File

@ -178,7 +178,7 @@ sub data_post_handler {
if ($transaction->data_size > 500_000) { if ($transaction->data_size > 500_000) {
$self->log(LOGINFO, $self->log(LOGINFO,
"skip: too large (" . $transaction->data_size . ")"); "skip, too large (" . $transaction->data_size . ")");
return (DECLINED); return (DECLINED);
} }
@ -424,7 +424,7 @@ sub reject {
if ($score < $reject) { if ($score < $reject) {
if ($ham_or_spam eq 'Spam') { if ($ham_or_spam eq 'Spam') {
$self->log(LOGINFO, "fail, $status < $reject, $learn"); $self->log(LOGINFO, "fail, tolerated, $status < $reject, $learn");
return DECLINED; return DECLINED;
} }
else { else {