Setup your own email server (MTA) on the cheap - part 7
All going well, this should be the last part of my posts about configuring Postfix as an MTA . This configuration arose because I happened to be looking at my mail.log file while someone in the Ukraine was trying again and again to log in to my server. So, I installed Fail2Ban. Fail2Ban is a clever tool that watches the log files you configure and when suspicious activity is found, it uses iptables (a linux firewall) to block the source of traffic. This tool is built for our setup so it’s relatively straight forward to setup: 1. Install Fail2Ban: sudo apt-get install fail2ban 2. In your favourite editor, create a file /etc/fail2ban/jail.local . This is where all the rules should be customised. Default rules are in jail.conf but these should be left (and will be updated in new versions) so customisation are all in your local file. This is the text I add to my jail.local file: 4. Finally, reload everything and you should be on your way sudo service fail2ban rest...