fail2ban
В /etc/fail2ban/jail.conf
[postfix-ban]
enabled = true
filter = postfix
action = iptables-multiport[name=PFIX, port="smtp,smtps", protocol=tcp]
logpath = /var/log/mail/all
[dovecot-ban]
enabled = true
filter = dovecot
action = iptables-multiport[name=DCOT, port="pop3,pop3s,imap,imaps", protocol=
logpath = /var/log/mail/all
[sasl-ban]
enabled = true
filter = postfix-sasl
action = iptables-multiport[name=SASL, port="smtp,smtps", protocol=tcp]
logpath = /var/log/mail/all