Applicable to:
- Plesk for Linux
Question
In the menu Subscriptions > example.com > Statistics (or just Statistics in Power User view), a big amount of POP3/IMAP traffic is shown.
Although, only one mail account is configured in the domains which belong to this subscription.
How to verify POP3/IMAP traffic statistics manually?
Answer
Note: the script takes mail statistics from /var/log/maillog* files. To make it showing statistics for the last month, adjust maillog rotation in /usr/local/psa/etc/logrotate.conf
- Connect to the server using SSH.
-
Check if the utility
bcis installed on the server:# command -V bc
bc is /bin/bcIf the following output is returned,
bcshould be installed as per the following steps:# command -V bc
/bin/command: line 2: command: bc: not found-
For RHEL-based operating systems (CentOS, RHEL, CloudLinux):
# yum install bc
-
For Debian and Ubuntu:
# apt install bc
-
-
Download the script and make it executable:
# wget https://raw.githubusercontent.com/plesk/kb-scripts/refs/heads/master/verify_pop3_imap_stats/verify_pop3_imap_stats.sh && chmod +x verify_pop3_imap_stats.sh
-
Execute the script:
# ./verify_pop3_imap_stats.sh
- Connect to the server via SSH.
-
Download the script and unpack it:
# wget https://raw.githubusercontent.com/plesk/kb-scripts/refs/heads/master/verify-courier-imap-stats/courier-traffic.py && chmod +x courier-traffic.py
-
Run the script with desired start and end dates and a domain name, if required
# ./courier_traffic.py --start 15-08 --end 22-08 --domain example.com --unit MB /var/log/maillog
Note: To see all available options run the script with
-hoption:./courier_traffic.py -h
Comments
Please sign in to leave a comment.