F
F
fluffybear2018-08-18 09:56:38
System administration
fluffybear, 2018-08-18 09:56:38

How to get rid of "warning: hostname does not resolve to address" messages in mail server logs?

I have a small mail server based on postfix 3.2.4
When bots and spammers knock on it, entries like this constantly appear in the logs:

Aug 17 10:32:00 postfix/smtpd[5917]: warning: hostname net150-ip48.suvorovo.org does not resolve to address 95.158.150.48: Name or service not known
Aug 17 10:37:16 postfix/smtpd[5935]: warning: hostname as.telnet.krakow.pl does not resolve to address 91.196.212.90
Aug 17 10:40:14 postfix/smtpd[5945]: warning: hostname static.vnpt.vn does not resolve to address 113.171.23.47
Aug 17 10:48:03 postfix/smtpd[5957]: warning: hostname 186-201-186-107.customer.tdatabrasil.net.br does not resolve to address 186.201.186.107: Name or service not known
Aug 17 10:53:38 postfix/smtpd[5970]: warning: hostname static-82.227.128.190.telecel.com.py does not resolve to address 190.128.227.82: Name or service not known
Aug 17 11:04:28 postfix/smtpd[6037]: warning: hostname net150-ip48.suvorovo.org does not resolve to address 95.158.150.48: Name or service not known
Aug 17 11:07:25 postfix/smtpd[6041]: warning: hostname b39c76df.virtua.com.br does not resolve to address 179.156.118.223: Name or service not known
Aug 17 11:09:57 postfix/smtpd[6044]: warning: hostname as.telnet.krakow.pl does not resolve to address 91.196.212.90
Aug 17 11:20:55 postfix/smtpd[6094]: warning: hostname b39c76df.virtua.com.br does not resolve to address 179.156.118.223: Name or service not known
Aug 17 11:24:14 postfix/smtpd[6100]: warning: hostname customer-190-63-137-83.claro.com.ec does not resolve to address 190.63.137.83: Name or service not known
Aug 17 11:34:24 postfix/smtpd[6168]: warning: hostname dsl-86-153.bl27.telepac.pt does not resolve to address 176.79.86.153: Name or service not known
Aug 17 11:37:10 postfix/smtpd[6168]: warning: hostname 166.247.33.187.in-addr.arpa does not resolve to address 187.33.247.166: Name or service not known
Aug 17 11:39:50 postfix/smtpd[6194]: warning: hostname net150-ip48.suvorovo.org does not resolve to address 95.158.150.48: Name or service not known
Aug 17 11:47:59 postfix/smtpd[6220]: warning: hostname 186-201-186-107.customer.tdatabrasil.net.br does not resolve to address 186.201.186.107: Name or service not known
Aug 17 12:36:46 postfix/smtpd[6459]: warning: hostname dsl-86-153.bl27.telepac.pt does not resolve to address 176.79.86.153: Name or service not known
Aug 17 12:39:28 postfix/smtpd[6492]: warning: hostname 166.247.33.187.in-addr.arpa does not resolve to address 187.33.247.166: Name or service not known

Is there a way to disable these notifications? Do not protect yourself from spammers, but simply do not write such a warning in the logs? So far, I've set up postscreen and cut off connections for several dnsbl, but I don't think this is optimal.
UPD: I don't want to disable smtpd_helo_restrictions = reject_unknown_helo_hostname either :)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
AUser0, 2018-08-19
@AUser0

Unfortunately postfix itself does not have logging management on such an "individual" level.
But there is filtering in programs that write log messages to /var/log/maillog.
You just need to know which program you have...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question