From 12191656dfead71419e2afbe54f7ebc7ccb3eb19 Mon Sep 17 00:00:00 2001 From: biji Date: Tue, 29 Jan 2019 13:01:26 +0700 Subject: [PATCH 1/2] Update sendmailanalyzer fix parsing: Client host [1.1.1.1] blocked using b.barracudacentral.org; Client host blocked using Barracuda Reputation, see http://www.barracudanetworks.com/reputation/?r=1&ip=1.1.1.1 --- sendmailanalyzer | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sendmailanalyzer b/sendmailanalyzer index d32d9d2..168c475 100755 --- a/sendmailanalyzer +++ b/sendmailanalyzer @@ -1413,7 +1413,7 @@ sub parse_sendmail $reject =~ s/^\s+//; $reject =~ s/[\s;]+$//; # Test PostFix DNSBL spam scan - if ($reject =~ /(?:client|helo) .* (blocked using .*)/i) { + if ($reject =~ /(?:client|helo) .* (blocked using .*;)/i) { my $spamdetail = $1; $SPAM{$host}{$id}{relay} = $relay; $SPAM{$host}{$id}{rule} = 'reject'; From 423e87dcda010a5a343e6165e263f75a24b254ce Mon Sep 17 00:00:00 2001 From: biji Date: Tue, 29 Jan 2019 18:00:56 +0700 Subject: [PATCH 2/2] fix if there is no ; --- sendmailanalyzer | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sendmailanalyzer b/sendmailanalyzer index 168c475..872e204 100755 --- a/sendmailanalyzer +++ b/sendmailanalyzer @@ -1413,7 +1413,7 @@ sub parse_sendmail $reject =~ s/^\s+//; $reject =~ s/[\s;]+$//; # Test PostFix DNSBL spam scan - if ($reject =~ /(?:client|helo) .* (blocked using .*;)/i) { + if ($reject =~ /(?:client|helo) (?:.*?) (blocked using [^;]+)/i) { my $spamdetail = $1; $SPAM{$host}{$id}{relay} = $relay; $SPAM{$host}{$id}{rule} = 'reject';