Re: Does Postfix cache resolv.conf? [SOLVED]
Thanks Stefan, The Debian packages of Postfix are running smtpd in a chroot by default. The files necessary for this are copied by the init script /etc/init.d/postfix - and amongst them is the resolv.conf you changed. It's exactly this. The chroot has its own copy of (caches) resolv.conf. Regards, - lars.
Re: Does Postfix cache resolv.conf?
Wietse Venema: Apparently postfix missed the switching of nameservers and did not learn of the new DNS until restart. Is this a bug or a feature? Like most programs, Postfix never reads /etc/resolv.conf. Yes, I suspected that. Instead, that file is read by the NSSWITCH system library functions, and the DNS system library functions. Postfix does not run on bare metal - instead it runs on an operating system that provides libraries and other runtime support. The strange thing is that postfix apparently was the only application on that box, which was unable to resolve names after the change of DNS. Following a restart it worked fine. So it must be something running in the context of postfix, e.g. a library, which causes the problem. I just try to figure out, what postfix does differently as compared to roughly a dozen of other applications, which were subject to the same change of DNS and eventually use the same system libraries. I'm just the kind of guy, who likes to know why something is happening. Since there are a lot of applications inventing wheels (the broken bind9 apparently crashes in its self-made memory manager), knowing that postfix doesn't is a useful input. Thanks a lot. Regards, - lars.
Does Postfix cache resolv.conf?
I had a quite strange issue. About a week ago my bind9 broke down and I could not get it running again on the same machine. So moved it to another machine and changed the /etc/resolv.conf of my machines to try both IP. Apparently everything worked fine. Today I was puzzled that the corresponding bug-report to the Debian list was somehow missing. I resent it watching the postfix logs and found that potfix was missing the MX entry of my relay host and refused to send. Since the host itself actually does not have a MX entry, I was sidetracked assuming postfix was not smart enough to strip the host name from the domain. During this trouble shooting I had postfix reload its configuration a couple of times. After setting the name in [] postfix reported that the A entry was missing, which definitely was wrong. I restarted postfix and voilá it continued working like it did all the years before. Now I know that it is smart enough to strip the relay host name from the domain to lookup MX. ;) Apparently postfix missed the switching of nameservers and did not learn of the new DNS until restart. Is this a bug or a feature? Postfix Version: 2.5.5 (Current Debian stable) Regards, - lars.