Stoping spam with postfix - 2015-03-18 19:38:18

Well Ihad some small troubles with spamers on postfix I found some commands to parse logs and get the user. Sometimes the user password was compromised, we need search the users what is sending spam like: zgrep 'sasl_method' /var/log/mail.log* | grep "postfix/smtpd" | awk '{print $9}' | sort -n | uniq -c | sort -n | tail that return is 4342 sasl_username=tania.perez@xxxx.com 20980 sasl_username=veroa@xxxxx.com Wow i see that two users login alot of times with the mailserver.