diff --git a/debian/sendmailanalyzer.conf b/debian/sendmailanalyzer.conf index fe939c0..434b629 100644 --- a/debian/sendmailanalyzer.conf +++ b/debian/sendmailanalyzer.conf @@ -309,3 +309,5 @@ NO_HOST_DOMAIN 0 # this directive to force sendmailanalyzer to take them as sent. NO_QUEUE_EXCLUSION 0 +# Custom milter-reject regex detected as spam +#MILTER_REJECT_REGEX Mailbox not found diff --git a/sendmailanalyzer b/sendmailanalyzer index c4808ed..a77d1ad 100755 --- a/sendmailanalyzer +++ b/sendmailanalyzer @@ -1606,7 +1606,7 @@ sub parse_sendmail $status =~ s/ \(.*//; #push(@{$TO{$host}{$id}{status}}, &clear_status($status)); } - } elsif ($status =~ /Spam message rejected/) { + } elsif ($status =~ /Spam message rejected/ || ($CONFIG{MILTER_REJECT_REGEX} && $status =~ /$CONFIG{MILTER_REJECT_REGEX}/)) { $SPAM{$host}{$id}{relay} = $relay; $SPAM{$host}{$id}{rule} = 'reject'; $SPAM{$host}{$id}{spam} = $status;