External server getting connection refuse

Hey guys, I got a weird problem, it seems that one of my own website server, which is sending smtp email using my MIAB on another server, has been blocked by my MIAB. My website server is not able to connect to it at all?
Telnet doesn’t even connect, but with all other servers I’m able to telnet to it…
telnet box.xxxxxx.net 587
Trying 159.xxx.xxx.xxx…
telnet: Unable to connect to remote host: Connection refused

From other Ubuntu server I get:
telnet box.xxxx.net 587
Trying 159.65.xxx.xxx…
Connected to box.xxxxx.net.
Escape character is ‘^]’.
220 box.xxxxxx.net ESMTP Hi, I’m a Mail-in-a-Box (Ubuntu/Postfix; see https://mailinabox.email/)

Alright, I solved my own problem, posting the solution here for everyone else benefit.

This happened probably because I have changed the email password and probably made a mistake configuring it properly. So the connection kept being rejected which caused fail2ban to ban the server IP.

I copied the jail.conf to jail.local at this location: /etc/fail2ban/

Then in jail.local I have added all my servers IP to the ignore list.

When updating MIAB will the jail.local be deleted?

1 Like

Yes. It will be deleted.

I think you could unblock/ignore the IP in another jail-file, e.g.
/etc/fail2ban/jail.d/mailinabox-unblock.conf, but you need to test out if that works (not sure).

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.