how to send mail with fail2ban using postfix


in /etc/fail2ban/action.d/ I copied and renamed this files by changing all the sendmail to postfix Works fine for me now:

e.g cp sendmail-buffered.conf postfix-buffered.conf

same for all the rest of the sendmail conf files within this folder....

Then restart the fail2ban service -ref: you create your jail.local file (because you should not modify the jail.conf because of fail2ban updates), these are the overwrite settings I have used: 

sender = fail2ban

destemail =

action = %(action_mwl)s

#Action to take when a possible intruder is detected. Default is %(action_)s which will only ban the IP. With %(action_mwl)s it will ban the IP and send a mail notification including whois data and log entries. See comments in /etc/fail2ban/jail.conf for more information.



2017-06-29 10:23:27gstlouis