This part should be in your /etc/fail2ban/jail.conf:
Code:
[postfix]
enabled = true
port = smtp
filter = postfix
logpath = /var/log/mail.log
maxretry = 1
bantime = 86400
# 1 month = 2419200; week = 604800; day = 86400
Put the following line to /etc/fail2ban/filter.d/postfix.conf
Code:
failregex = reject: RCPT from (.*)\[<HOST>\]: 550
Add a info like this:
Code:
Your IP-Address is banned from our Mailsystems during the next 24 hours
in your
/usr/sbin/policyd-weight to every 550 code.
You can check the current banned ip´s with
Code:
iptables -L fail2ban-postfix
Greez BeNe