Results 1 to 5 of 5

Thread: Wrong amavis stats

  1. #1
    claros's Avatar
    claros is offline Project Contributor
    Join Date
    Mar 2006
    Location
    L'Aquila, ITALIA
    Posts
    59
    Rep Power
    9

    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

  2. #2
    claros's Avatar
    claros is offline Project Contributor
    Join Date
    Mar 2006
    Location
    L'Aquila, ITALIA
    Posts
    59
    Rep Power
    9

    Default

    It works very well now, amavis stats are correct.
    It may be that in a previus version the queued_as information were not included in the amavis log...
    Another hack:
    in the line 293 of /opt/zimbra/libexec/zmlogprocess I've changed this query:
    $sth = sqlExec("select count(*) from amavis where ".
    "host = '".$host."' and ".
    "arrive_time >= '".$periodStart."' and ".
    "arrive_time <= '".$periodEnd."' and ".
    "status = 'SPAM'");


    to read:

    $sth = sqlExec("select count(*) from amavis where ".
    "host = '".$host."' and ".
    "arrive_time >= '".$periodStart."' and ".
    "arrive_time <= '".$periodEnd."' and ".
    "status like 'SPAM%'");

    In this way my spam stat includes also SPAMMY messages and I like it..

    Ciao

  3. #3
    phoenix is offline Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,506
    Rep Power
    57

    Default

    Hi

    Thanks for finding that, could you file an entry in bugzilla so that it gets looked at by zimbra?
    Regards


    Bill


    Acompli: A new adventure for Co-Founder KevinH.

  4. #4
    claros's Avatar
    claros is offline Project Contributor
    Join Date
    Mar 2006
    Location
    L'Aquila, ITALIA
    Posts
    59
    Rep Power
    9

    Default

    Quote Originally Posted by phoenix
    Hi

    Thanks for finding that, could you file an entry in bugzilla so that it gets looked at by zimbra?
    Bug 11179 Submitted

    Have a nice week-end!

  5. #5
    phoenix is offline Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,506
    Rep Power
    57

    Default

    Thanks for that, a good week-end to you too.
    Regards


    Bill


    Acompli: A new adventure for Co-Founder KevinH.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Daily mail report always reports "No messages found"
    By McPringle in forum Installation
    Replies: 42
    Last Post: 06-13-2011, 08:57 AM
  2. Web client logon fails (INVALID_PDU)
    By jermxx in forum Installation
    Replies: 8
    Last Post: 02-20-2007, 02:20 PM
  3. Tomcat broken after upgrade to 4
    By dotslashroot in forum Migration
    Replies: 13
    Last Post: 01-31-2007, 06:05 PM
  4. Wrong info in Disk Stats
    By brained in forum Installation
    Replies: 3
    Last Post: 10-19-2006, 04:13 PM
  5. No data in server statistics
    By zap in forum Administrators
    Replies: 63
    Last Post: 02-13-2006, 11:39 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •