Setup fail2ban email notifications? Topic is solved

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
Post Reply
matt22207

Setup fail2ban email notifications?

Post by matt22207 »

Hi, I've installed fail2ban on my XU4 dietpi. How can I get it to send me email notifications when a ban is started/stopped?

I see in /etc/fail2ban/jail.conf :

Code: Select all

destemail = root@localhost
sendername = Fail2Ban
sender = fail2ban@localhost
banaction = iptables-multiport
mta = sendmail
However, sendmail is not installed (postfix is), and nothing is sending. If i switch the mta to postfix, I don't see any activity in /var/log/mail.log when a ban occurs.. also after installing mailutils running "mail" at the command line, any emails that I send to a gmail destemail get rejected.

How do i configure my dietpi properly to send emails external of the system?
Post Reply