mirror of
https://github.com/darold/sendmailanalyzer.git
synced 2026-05-15 14:15:56 -06:00
parse amavisd-new spam detail and autolearn
This commit is contained in:
parent
54ea1fd12d
commit
102d771920
1 changed files with 10 additions and 2 deletions
|
|
@ -1061,7 +1061,9 @@ sub parse_sendmail
|
|||
if ($CONFIG{SPAM_DETAIL}) {
|
||||
$SPAMDETAIL{$host}{$id}{date} = $time_st;
|
||||
$SPAMDETAIL{$host}{$id}{type} = 'amavis';
|
||||
$SPAMDETAIL{$host}{$id}{spam} = $status;
|
||||
if (not defined $SPAMDETAIL{$host}{$id}{spam}) {
|
||||
$SPAMDETAIL{$host}{$id}{spam} = $status;
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
@ -1806,10 +1808,16 @@ sub parse_amavis
|
|||
}
|
||||
$SPAMDETAIL{$host}{$id}{type} = 'amavis';
|
||||
$SPAMDETAIL{$host}{$id}{date} = $timest;
|
||||
$SPAMDETAIL{$host}{$id}{spam} = $SPAM{$host}{$id}{spam};
|
||||
if ($str =~ / Hits: ([\d\.]+)/) {
|
||||
$SPAMDETAIL{$host}{$id}{score} = $1;
|
||||
}
|
||||
if ($str =~ / Tests: (.*), autolearn=([^\s]+),/) {
|
||||
$SPAMDETAIL{$host}{$id}{spam} = $1;
|
||||
$SPAMDETAIL{$host}{$id}{autolearn} = $2;
|
||||
} else {
|
||||
$SPAMDETAIL{$host}{$id}{spam} = $SPAM{$host}{$id}{spam};
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} elsif ($str =~ /\(([^\)]+)\) (Passed|Blocked) SPAM(.*?) [<]*([^\s>]*)[>]* -> [<]*([^,>]*)[>]*, Hits: ([^,]+), (.*)/) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue