Everything worked fine for months. I recently got a new domain and wanted to move my whole mail setup to the new domain. So i updated the mailcow.conf and changed the right dns entries.
But since then everytime my mail client connects the server freezes. My ssh connection is getting closed and i cannot login anymore. I have to restart the whole server.
Do you have some hints for me? Which log files do you need?
Hi, what exactly did you change and run?
Which kernel? :)
Kernel: Linux mailserver 4.4.0-130-generic #156-Ubuntu SMP Thu Jun 14 08:53:28 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
I changed the MAILCOW_HOSTNAME in mailcow.conf from mail.malura.me to mail.malura.de. Then i ran docker-compose stop && docker-compose up -d.
In AWSs Route-53 i removed all the needed entries on my old malura.me domain and added them correctly to the malura.de. This was confirmed by the mailcow dns check.
That was it so far.
I created a video so you can see what is happening (Link). As i recorded the video everything worked and i thought some magic happened. But then i enabled some more accounts in my client which all connect to the same mailserver and it crashed. It could be possible that it has something to do with fail2ban because the credentials for the other accounts are not updated yet.
Hi @maluramichael ,
I guess you're getting blacklisted by netfilter-mailcow - as I suspect you don't have a fixed IP address on your connection which can be whitelisted.
Edit: I took a look at your video. You can clearly see that you're getting blacklisted in your console log window ... The server is neither crashing / freezing nor anything else ... You're connection stalls - yes, but this is due to getting banned.
Edit 2: "84.176.186.117 matched rule id 2" and "Banning 84.176.186.0/24 for 30 minutes"
All the best, Tim
Yes, that's it. 馃憤
It could be possible that it has something to do with fail2ban because the credentials for the other accounts are not updated yet.
@andryyy yea i updated the domain name in my client and added the correct dns entries for my old domain malura.me again and now it works. This is really nice but you guys still have a problem somewhere. I don't understand why the whole server would freeze because of this.
Once again: The server does NOT freeze! Your IP is getting banned. Therefor the server seems to have stopped working from your perspective. But it hasn't. It just drops each and every packet sent from your IP address.
Oh alright. It was weird because i could not even connect via ssh. I thought only mail clients get banned.
Seems so ... ;-)
Alright. Thank you @tkorves for your help. Great project guys 馃槂
@maluramichael thanks for the Hetzner Cloud demo :-)
I ran into the same problem. Tested IMAP/SMTP connections and netfilter banned the whole communication to the server itself (SSH etc.) from my IP address.
IMHO the blacklist/block should be port based like fail2ban does.
Maybe it's worth to switch to fail2ban replacing your netfilter script?
No, fail2ban will not work.
You can just whitelist the IPs you are testing from.
I doubt fail2ban bans port based. It will just drop/reject the IP.