count pop3 logins

show users that are sending email:
mail /var/log# grep authid= /var/log/maillog | awk -F “]” ‘{print$3}’ | awk -F , ‘{print$2}’ | tr -d ” ” | sort | uniq -c | sort -rn

show what IP addresses are sending email:
mail /var/log# grep authid= /var/log/maillog | awk -F “]” ‘{print$2}’ | awk -F “[” ‘{print$2}’ | tr -d ” ” | sort | uniq -c | sort -rn

Change max connections for IMAP

On a busy server, the default number of connections allowed for IMAP users might be too low. If you have IMAP customers complaining about connections being refused, you might need to increase the number of simultaneous connections.

Edit the following file:
/etc/courier-imap/imapd

Restart imapd:
/etc/init.d/courier-imapd restart