View Single Post
  #1 (permalink)  
Old 10-05-2006, 05:00 PM
claros claros is offline
Project Contributor
 
Posts: 58
Default Wrong amavis stats

Hi,
That seemed to me that spam stats, even if displayed, where wrong.
So I used a perl tool to get stats from amavis log and got differents results from the graph displayed in the admin console.
Having a look into the logger database, the amavis table has got only discarded spam and virus and some bad header clean message.
So I've changed line 891 of 1222 of /opt/zimbra/libexec/zmlogprocess from:

if ($msg =~ /\(([^)]+)\) (Passed|Blocked) ([^,]+), (?:LOCAL )?\[([^]]+)\] \[([^]]+)\] <([^>]*)> -> (<[^>]+>(?:,<[^>]+>)*),(?: quarantine: [^,]+,)? Message-ID: <([^>]+)>,(?: Resent-Message-ID: <[^>]+>,)? mail_id: \S+, Hits: (\S+), (\d+) ms/) {

to:

if ($msg =~ /\(([^)]+)\) (Passed|Blocked) ([^,]+), (?:LOCAL )?\[([^]]+)\] \[([^]]+)\] <([^>]*)> -> (<[^>]+>(?:,<[^>]+>)*),(?: quarantine: [^,]+,)? Message-ID: <([^>]+)>,(?: Resent-Message-ID: <[^>]+>,)? mail_id: \S+, Hits: (\S+),(?: queued_as: [^,]+,)? (\d+) ms/) {

This change includes clean and spammy messages into the amavis table of the logger db. Output of zmlogprocess is found in /tmp and I've no more ERROR lines about "Processing amavis entries from ..."
Actually waiting for spam stats updates, I've not read all the perl code so I don't know how those lines will be processed during amavis log aggregation and graph generation...
Will the logger crash ? :-)

Ciao
Claudio
Reply With Quote