How to update reseller’s subaccounts disk quota and bandwidth on cPanel server

Useful if you have plan limited by:

– limitation by amount of cPanel accounts
– bandwidth limitation
– disk space limitation
– overselling disabled

Update reseller’s packages with new limits via command line

sed -i -e "s/QUOTA=.*/QUOTA=2000/g" /var/cpanel/packages/resellerusername_*
sed -i -e "s/BWLIMIT=.*/BWLIMIT=20000/g"
Read the rest

How to calculate IMAP/POP3 dovecot bandwidth

How to calculate IMAP dovecot bandwidth:

less /var/log/maillog |grep Aug |grep DOMAIN.COM |grep -Po 'out\=.+?,' |cut -d '=' -f2 |tr -d ,|awk '{s+=$1} END {print "total: ", s, " bytes transferred over IMAP"}'

total:  83107245783  bytes transferred over IMAP

echo "83107245783/1024/1024" |bc

How to calculate POP3 dovecot bandwidth:

less /var/log/maillog |grep DOMAIN.COM
Read the rest