3

I installed iRedMail on VPS (Ubuntu). Fail2Ban bans my home IP address.

In /var/log/mail.log I see messages like:

postfix/submission/smtpd[32149]: warning: hostname unallocated.sta.lan.ua does not resolve to address 31.43.102.*: Name or service not known

unallocated.sta.lan.ua as I understand is the hostname of my home internet provider.

31.43.102.* is my home IP.

Where is the problem? Is it Internet Provider problem or my fault where my server\iRedMail is not configured properly (if so, how to fix)?

Thomas
  • 4,155
  • 5
  • 21
  • 28
TitanFighter
  • 135
  • 1
  • 7

1 Answers1

3

The reverse DNS warning is not really a misconfiguration on your end. Some ISP's just don't provide Forward-confirmed reverse DNS for their addresses.

I'm assuming that this isn't actually causing mail rejection by Postfix but rather a ban by fail2ban. You can check your fail2ban configuration for rules that watch /var/log/mail.log for a pattern that matches the one you posted and then disable that rule. Or you can whitelist your home IP address in the fail2ban configuration by adding it to the ignoreip list in jail.conf.

Grisha Levit
  • 365
  • 1
  • 7
  • You are right, Postfix does not reject mails, but fail2ban bans. I tried to find the rule via `find /etc/fail2ban/ -type f -exec grep -H 'tried different text' {} \;` but no success. It looks like this rule does not exists at all, but in `iptables -L` I see that hostname is rejected. I added hostname to `ipignore`, but it looks like a workaround rather than a right solution. – TitanFighter Jan 16 '17 at 14:33
  • @TitanFighter I don't see anything matching this in a default fail2ban installation. Perhaps it is matching some other line in your log. – Michael Hampton Jan 16 '17 at 18:06