3

I would like to turn off this warning Postfix warning:

Apr 4 19:03:54 cm postfix/smtpd[7456]: warning: x1.208.40.68: hostname x1-208-40-68.mxxx.net verification failed: Name or service not known

The reason why I want to turn off this warning is I get 80 messages every minute on this mail server and my egrep command is picking up too much information. I would rather Postfix not report this warning so that I can focus on the important warning generated from systems elsewhere.

Egrep command:

tail -f /usr/local/psa/var/log/maillog | egrep -i "unable|failed|refused|error|warning"

From what I understand from this post, the warning appears because there is no proper reverse (PTR) record for this host. See here:

http://kolab.org/pipermail/kolab-users/2010-July/011771.html

Using Webmin I find setting under SMTP Authentication And Encryption, "Reject clients with no reverse hostname". This appears to be a matching setting in case I actually wanted to reject those clients. Could someone confirm? Again, my aim is not to reject these clients. I just want to turn off the warnings.

2 Answers2

2

That's what I read too a while back, it's DNS mismatching (which is easily done even on good set ups), eg there's two PTR records on some Name Servers etc. One for the NS name and one for the hostname of the box the NS lives on.

Do you have 'helpful_warnings' enabled in main.cf ?

Jonathan Ross
  • 2,173
  • 11
  • 14
  • I did not have it at all. I added it and made it "no" and restarted. I still get the warnings. For good measure I made it yes (which is the default). And I still get it. If push comes to shove I might just enable reverse. But due to heavy load I don't want to take too many chances, especially for my SMTP auth clients. – Eugene van der Merwe Apr 04 '11 at 17:38
  • Still no fix but further info: `The error message comes from the system library. The exact text changed when Postfix was ported for IP version 6, because it has to use a different system library routine. Before IPv6: function: gethostbyname(). Error message: Host not found. After IPv6: function: getaddrinfo(). Error message: Name or service not known` – Jonathan Ross Apr 05 '11 at 07:51
  • `check_reverse_client_hostname_access` from `http://www.postfix.org/postconf.5.html` is about the closest I can find but I doubt that's correct, it's a table for a start. – Jonathan Ross Apr 05 '11 at 07:56
  • This is also a helpful reply. Perhaps I can manipulate the table so that I don't get the message. Not ideal but perhaps the end goal will be achieved. At this point I guess I am willing to live with the problem because if it was strait forward then you Postfix expert would have found it already :-) – Eugene van der Merwe Apr 06 '11 at 06:31
2

If you want to disable this behaviour, look for the smtpd_client_restrictions setting in main.cf and remove reject_unknown_client_hostname or reject_unknown_reverse_client_hostname.

Cakemox
  • 24,141
  • 6
  • 41
  • 67
  • Thank you, this is a helpful answer and I have "upped" it. However I don't have those setting in main.cf but your reference to it in the manual will be useful: http://www.postfix.org/postconf.5.html#reject_unknown_reverse_client_hostname Remember my idea is to turn off the warnings. I'm not having that behavior. – Eugene van der Merwe Apr 04 '11 at 17:56
  • Maybe I misread...is the name and IP listed in that log snippet your mail host? – Cakemox Apr 04 '11 at 18:26
  • The name and IP listed in that log snipped is of a foreign host. I have 100s of lines like these in the log file on my busy server, all foreign hosts. – Eugene van der Merwe Apr 04 '11 at 18:48