How to calculate IMAP/POP3 traffic manually for the particular domain in Plesk?

Created:

2016-11-16 12:52:29 UTC

Modified:

2017-04-24 12:09:02 UTC

0

Was this article helpful?


Have more questions?

Submit a request

How to calculate IMAP/POP3 traffic manually for the particular domain in Plesk?

Applicable to:

  • Plesk 12.5 for Linux
  • Plesk 11.5 for Linux

Question

There is IMAP/POP3 traffic discrepancy between Plesk and OBAS. How to calculate IMAP/POP3 traffic manually for the particular domain in Plesk using maillog?

Answer

  1. Use the following scripts to calculate IMAP/POP3 statistics manually (for example, for domain example.com for March,29):

    # zgrep 'Mar 29.*service=imap.*example.com' /var/log/maillog.processed.1.gz | egrep -o 'rcvd=[0-9]+' | cut -d= -f2 | awk '{S += $1} END {print S}'

    19662708

    # zgrep 'Mar 29.*service=imap.*example.com' /var/log/maillog.processed.1.gz | egrep -o 'sent=[0-9]+' | cut -d= -f2 | awk '{S += $1} END {print S}'

    90582838
  2. Make sure the correct data is reflected in the database:

    # plesk db "select date, pop3_imap_in, pop3_imap_out from DomainsTraffic where dom_id=(select id from domains where name = 'example.com') and date = '2016-03-29';"

    +------------+--------------+---------------+

    | date | pop3_imap_in | pop3_imap_out |
    +------------+--------------+---------------+

    | 2016-03-29 | 19662708 | 90582838 |
    +------------+--------------+---------------+
Have more questions? Submit a request
Please sign in to leave a comment.