Page 1 of 1

fail2ban not working with Dovecot

Posted: Sat Oct 17, 2020 10:16 am
by HenrysCat
After updating CentOS7 with 'yum update' all jails are not banning, this is with Dovecot 2.2.36

Running

Code: Select all

fail2ban-regex /var/log/dovecot.log /etc/fail2ban/filter.d/dovecot.conf
Gives

Code: Select all

Running tests
=============

Use   failregex filter file : dovecot, basedir: /etc/fail2ban
Use      datepattern : Default Detectors
ERROR: No failure-id group in '(?: pop3-login|imap-login): (?:Authentication failure|Aborted login \(auth failed|Aborted login \(tried to use disabled|Disconnected \(auth failed).*rip=(?P<host>\S*),.*'
[root@rainmail ~]# 
If I remove

Code: Select all

[dovecot-iptables]
enabled = true
filter  = dovecot
action  = vesta[name=MAIL]
logpath = /var/log/dovecot.log
maxretry = 5
bantime = 86400
From /etc/fail2ban/jail.local it all starts working again just without Dovecot failed login attempts getting banned, any ideas?

I originally got this working by following viewtopic.php?f=10&t=9040 however the update has changed something.