Use fail2ban to protect the POSTFIX email system
I have met several users who have been guessed by the program and used to forward spam. After checking the mail log, I found that a large number of IP addresses were connected to send emails. Of course, I also guessed the POP3 PASSWORD, the following uses postfix as an example. My debian system is installed with the following command: apt-get install-y fail2ban open postfix and jail under the/etc/fail2ban directory. conf find the postfix entry and change false to true as follows: [postfix] 2 3 enabled = true 4 port = smtp 5 filter = postfix 6 logpath =/var/log/mail. log and modify the filter according to the Mail log content. d/postfix. conf, changed to the following: failregex = warning :(. *) \ [<HOST> \]: sasl login authentication failed: log Source: Nov 27 16:55:59 mail postfix/smtpd [6172]: warning: unknown [192.210.62.103]: sasl login authentication failed: UGFzc3dvcmQ6 restart fail2ban.