Package: postfix
Version: 3.1.0-5+b1
Severity: normal
Tags: patch

Dear Maintainer,

In recent versions of postfix changes to /etc/resolv.conf by resolvconf
are not propagated to the copy in the chroot.  This can result in
failed DNS lookups and consequent errors.

The cause appears to be that resolvconf runs its hook scripts with
PATH=/sbin:/bin and the postfix hook script exits after failing to run
service (which is in /usr/sbin) to check the postfix service status.

The attached patch fixes the issue by using the full path to service for
each call.  I would suggest also removing 2>&1 from the service calls,
but did not make that change in the attached patch.


-- System Information:
Debian Release: stretch/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (101, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.7.4+kevinoid1 (SMP w/4 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages postfix depends on:
ii  adduser                3.115
ii  cpio                   2.11+dfsg-5
ii  debconf [debconf-2.0]  1.5.59
ii  dpkg                   1.18.10
ii  init-system-helpers    1.44
ii  libc6                  2.23-5
ii  libdb5.3               5.3.28-12
ii  libicu57               57.1-4
ii  libsasl2-2             2.1.26.dfsg1-15
ii  libsqlite3-0           3.14.1-1
ii  libssl1.0.2            1.0.2h-1
ii  lsb-base               9.20160629
ii  netbase                5.3
ii  ssl-cert               1.0.38

Versions of packages postfix recommends:
ii  python3  3.5.1-4

Versions of packages postfix suggests:
ii  bsd-mailx [mail-reader]  8.1.2-0.20160123cvs-3
pn  dovecot-common           <none>
ii  icedove [mail-reader]    1:45.2.0-4+b1
ii  libsasl2-modules         2.1.26.dfsg1-15
ii  mutt [mail-reader]       1.7.0-1
pn  postfix-cdb              <none>
pn  postfix-doc              <none>
pn  postfix-ldap             <none>
pn  postfix-mysql            <none>
pn  postfix-pcre             <none>
pn  postfix-pgsql            <none>
ii  procmail                 3.22-25
ii  resolvconf               1.79
pn  sasl2-bin                <none>
pn  ufw                      <none>

-- Configuration Files:
/etc/resolvconf/update-libc.d/postfix changed [not included]

-- debconf information excluded
>From 847cb89c0b40ddde7b50bfc33b1f1422343dbdd0 Mon Sep 17 00:00:00 2001
Message-Id: <>
From: Kevin Locke <>
Date: Sun, 18 Sep 2016 21:34:30 -0600
Subject: [PATCH] Use full path to service in update-libc.d

resolvconf runs its hook scripts with PATH=/sbin:/bin.  This causes the
service invocation to fail with "command not found" (with the error
message sent to /dev/null) and the script to unconditionally exit early.
Fix it by using the full path to /usr/sbin/service.

Signed-off-by: Kevin Locke <>
 debian/update-libc.d | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/debian/update-libc.d b/debian/update-libc.d
index 44faba0..80b8f1f 100644
--- a/debian/update-libc.d
+++ b/debian/update-libc.d
@@ -2,12 +2,12 @@
 # we only need to copy this in if the service is already running.
 # if it's not running, it'll get picked up by the init script on start.
-service postfix status >/dev/null 2>&1 || exit 0
+/usr/sbin/service postfix status >/dev/null 2>&1 || exit 0
 QUEUEDIR="$(/usr/sbin/postconf -h queue_directory 2>/dev/null || true)"
 if [ -n "$QUEUEDIR" ]; then
     cp /etc/resolv.conf ${QUEUEDIR}/etc/resolv.conf
-    service postfix reload >/dev/null 2>&1 || exit 0
+    /usr/sbin/service postfix reload >/dev/null 2>&1 || exit 0
 exit 0

Reply via email to