Source: postfix
Version: 3.1.4-3
Severity: important

Hi,

my fairly standard Debian stretch installation that uses resolvconf with
dns-* configuration lines in /etc/network/interfaces reproducibly does
start a postfix instance at boot unable to deliver any mail to an
external destination.

Jan 30 13:56:32 voiptest postfix/error[49391]: 5B33E1621E:
to=<x...@lrz.de>, relay=none, delay=2128, delays=2128/0.03/0/0,
dsn=4.4.3, status=deferred (delivery temporarily suspended: Host or
domain name not found. Name service error for name=xxx.lrz.de
type=MX: Host not found, try again)

The reason is that an empty resolv.conf is copied into the chroot

root@voiptest:~# cat /etc/network/interfaces
# The primary network interface
auto eth0
iface eth0 inet static
[...]
        dns-nameservers 10.156.33.53 129.187.5.1
        dns-search lrz.de srv.lrz.de srv.mwn.de ws.lrz.de

root@voiptest:~# cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by
# resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 10.156.33.53
nameserver 129.187.5.1
search lrz.de srv.lrz.de srv.mwn.de ws.lrz.de

root@voiptest:~# cat /var/spool/postfix/etc/resolv.conf       
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by
# resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN

probably because postfix starts too early.

Adding

===
After=resolvconf.service
===

to /etc/systemd/system/postfix.service.d/override.conf seems to fix 
this problem. 

Bernhard

Reply via email to