Skip to main content

Tracking Down Excessive POP3 Usage

Comments

8 comments

  • cPanelMichael
    Hello, You may find this command helpful:
    grep domain.com /var/log/maillog* | grep retr= | grep -v retr=0 | awk {'print $11'} | cut -d, -f1 | cut -d= -f2 | awk '{t += $1} END { print "total: ", t, " bytes transferred over POP3"}'
    Thank you.
    0
  • orty
    Hello, You may find this command helpful:
    grep domain.com /var/log/maillog* | grep retr= | grep -v retr=0 | awk {'print $11'} | cut -d, -f1 | cut -d= -f2 | awk '{t += $1} END { print "total: ", t, " bytes transferred over POP3"}'
    Thank you.

    I did find it useful, thanks. It helped me see that something's being reported wrong somewhere or something was wonky in the grep. After running the grep, I got this:
    total: 4079902 bytes transferred over POP3
    So I checked to make sure that log files are getting rotated properly, and it appears they are:
    root@machine [/var/log]# ll maillog* -rw-------. 1 root root 8071296 May 27 19:00 maillog -rw-------. 1 root root 14967515 May 3 03:15 maillog-20150503 -rw-------. 1 root root 16054207 May 10 03:26 maillog-20150510 -rw-------. 1 root root 18189028 May 17 03:39 maillog-20150517 -rw-------. 1 root root 15832581 May 24 03:49 maillog-20150524 root@machine [/var/log]#
    Am I missing something obvious here, but it seems like 4079902 bytes < 90+ Gigs :). Where does cPanel get those numbers for the bandwidth calculations? Or did the grep pull from the wrong place in the file (I'm not strong in my grep-fu).
    0
  • cPanelMichael
    Hello, Are you sure that was the only output you received from the grep command? It's likely the output for a single POP3 session, not an overall total. Thank you.
    0
  • orty
    That's the only o
    Hello, Are you sure that was the only output you received from the grep command? It's likely the output for a single POP3 session, not an overall total. Thank you.

    Yep, that's the only output I see. Attached is a screenshot from Putty that shows the command output right after I logged in (ran just a few minutes ago), as well as a quick tail on maillog so you can see its format, so you can make sure the grep matches up. Edit: Since the image appears to have been compressed when attached, you can find it here, too - Removed -
    0
  • cPanelMichael
    Yes, that command does appear to search out a total. The POP3 bandwidth usage is likely accurate, but you are welcome to open a support ticket using the link in my signature if you want us to take a closer look. You can post the ticket number here so we can update this thread with the outcome. Thank you.
    0
  • orty
    I'll ask a friend of mine (and cohort on the server management) to give me his thoughts, otherwise I'll get a ticket open. Thanks!
    0
  • orty
    Yes, that command does appear to search out a total. The POP3 bandwidth usage is likely accurate, but you are welcome to open a support ticket using the link in my signature if you want us to take a closer look. You can post the ticket number here so we can update this thread with the outcome. Thank you.

    Ticket # is 6603753. Thanks!
    0
  • cPanelMichael
    To update, it looks like one user is downloading their entire inbox every time they access POP3. The following command helps show this:
    grep domain.com /var/log/maillog* | grep retr= | grep -v retr=0 | awk {'print $11'} | cut -d, -f1 | cut -d / -f2 | awk '{t += $1} END { print "total: ", t, " bytes transferred over POP3"}'
    Thank you.
    0

Please sign in to leave a comment.