Fail2ban bans mail user

Hello,
I just created a new web server, and fail2ban, bans users attempting to retrieve emails
Is that normal? How to fix this?

Hi @dyrer,

If the users are failing to authenticate… yes, it’s normal… but you first need to know what jail is banning your users.

grep Ban /var/log/fail2ban.log

You can also use this command:

fail2ban-client banned

Or this, but with this command you won’t see the jail:

v-list-firewall-ban

I suppose it should be the dovecot-iptables jail, if that is the case, grep dovecot log with the banned ip to know what’s going on:

Note: replace 203.0.113.1 with the banned ip.

grep -F '203.0.113.1' /var/log/dovecot.log

To unban an ip:

v-delete-firewall-ban IP CHAIN

Example with ip 203.0.113.1 and chain MAIL (you can see the chain using command v-list-firewall-ban):

v-delete-firewall-ban 203.0.113.1 MAIL
2 Likes