The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Audit mail usage

Discussion in 'E-mail Discussions' started by Robert Spencer, Feb 10, 2016.

  1. Robert Spencer

    Robert Spencer Registered

    Joined:
    Feb 10, 2016
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    South Africa
    cPanel Access Level:
    Root Administrator
    I'm busy writing a script to audit a specific domains email usage.

    I can see who the top bandwidth users, but noticed a discrepancy. In cPanel for the 3rd of February the entire domain used 471.23 MB via IMAP.

    Yet in the logs:

    Code:
    # zgrep "^Feb  3" /var/log/maillog-20160207.gz | awk '/dovecot: imap/ && /example.com/ && /bytes=/ {print $NF}' | sed -e 's/bytes=//' -e 's/\// /' | awk '{sum+=$1+$2} END {print sum}'
    2336787930
    That's almost a 2GB difference.

    Checking the 4th and there's about a 700MB difference with the logs being higher.

    5th there's about a 800MB difference with the logs being higher.

    What am I misunderstanding or is there something wrong?
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    653
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page