Package: postfix Version: 3.2.5-1 Tags: patch Postfix currently warns, when a remote host does not correctly resolve its address. This happens on my mailserver multiple times a day and clutters loganalysis, e.g. journalctl -p5.
This patch makes this log an info message.
From 7d8b27038b3832b4ece8197105b8e628307e3a2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= <cgzo...@googlemail.com> Date: Tue, 12 Dec 2017 17:07:36 +0100 Subject: [PATCH] set resolv to address failure to info do not log lines like 'warning: hostname 45.63.61.213.vultr.com does not resolve to address 45.63.61.213: Name or service not known' as warning --- debian/patches/70_postfix-warn.diff | 19 +++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 20 insertions(+) create mode 100644 debian/patches/70_postfix-warn.diff diff --git a/debian/patches/70_postfix-warn.diff b/debian/patches/70_postfix-warn.diff new file mode 100644 index 0000000..fcc157f --- /dev/null +++ b/debian/patches/70_postfix-warn.diff @@ -0,0 +1,19 @@ +--- a/src/smptd/smtpd_peer.c 2017-12-12 17:03:06.729926037 +0100 ++++ b/src/smtpd/smtpd_peer.c 2017-12-12 17:06:05.687290742 +0100 +@@ -362,14 +362,14 @@ + aierr = hostname_to_sockaddr_pf(state->name, state->addr_family, + (char *) 0, 0, &res0); + if (aierr) { +- msg_warn("hostname %s does not resolve to address %s: %s", ++ msg_info("hostname %s does not resolve to address %s: %s", + state->name, state->addr, MAI_STRERROR(aierr)); + REJECT_PEER_NAME(state, (TEMP_AI_ERROR(aierr) ? + SMTPD_PEER_CODE_TEMP : SMTPD_PEER_CODE_FORGED)); + } else { + for (res = res0; /* void */ ; res = res->ai_next) { + if (res == 0) { +- msg_warn("hostname %s does not resolve to address %s", ++ msg_info("hostname %s does not resolve to address %s", + state->name, state->addr); + REJECT_PEER_NAME(state, SMTPD_PEER_CODE_FORGED); + break; diff --git a/debian/patches/series b/debian/patches/series index 97a997f..45a6aed 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -15,3 +15,4 @@ 41_rmail.diff 50_LANG.diff 70_postfix-check.diff +70_postfix-warn.diff -- 2.16.1