@scottalanmiller said in Get Active User Login Count from Dovecot: cat /var/log/maillog | grep pop3-login:\ Login | sed -e 's/.Login: user=<(.)>, method=.*/\1/g' | sort | uniq | wc -l This tiny variation will get you all logins from all logs that you have stored. cat /var/log/maillog* | grep pop3-login:\ Login | sed -e 's/.*Login: user=<\(.*\)>, method=.*/\1/g' | sort | uniq | wc -l