Re: Does Postfix cache resolv.conf? [SOLVED]

2010-01-12 Thread Stan Hoeppner
Christoph Anton Mitterer put forth on 1/11/2010 5:31 PM:

 Using the resolvconf package, should solve your problems, the Debian
 postfix package ships rules for resolvconf in order to automatically
 update the chroot resolv.conf.

resolvconf has a long list of conflicts including ifupdown and bind8/9.  I've
heard of some folks running bind locally on their (large) mail servers for dnsbl
lookups (yes, instead of rbldnsd) and other purposes.  Would using resolvconf
break bind?  Aptitude seems to suggest this.  Does one need to be extra careful
if/when installing this package?  What kind of collateral damage does this
pagkage cause, if any?

Conflicts: bind ( 1:8.3.4-1), bind9 ( 1:9.2.1-7), dhcp-client (=
3.0.1betaRC4-1), dhcp-client ( 2.0pl5-18), dhcp3-client (
   3.0+3.0.1rc11-5), dhcpcd ( 1:1.3.22pl4-7), divine, dnsmasq (
1.13-2), ifupdown ( 0.6.4-4.1), laptop-net ( 2.21-1),
   pcmcia-cs ( 3.2.5-1), pdnsd ( 1.1.10par-4), pppconfig ( 2.3.1),
pppoeconf ( 1.0), pump ( 0.8.15-1), runit (
   1.8.0-3), totd ( 1.4-4), udhcpc ( 0.9.8cvs20050124-3), webmin (
1.150-2), webmin-wvdial ( 1.160-3), whereami (
   0.3.3), xisp

--
Stan


Re: Does Postfix cache resolv.conf? [SOLVED]

2010-01-12 Thread Christoph Anton Mitterer
On Tue, 2010-01-12 at 04:02 -0600, Stan Hoeppner wrote:
 resolvconf has a long list of conflicts including ifupdown and bind8/9.
Uhm has it?

 Would using resolvconf
 break bind?
Unlikely,.. at least I'm using it together with bind9

   Aptitude seems to suggest this.
Well the resolvconf package conflicts against some specific versions,
which were until then not made compatible with it.

   Does one need to be extra careful
 if/when installing this package?
There's a readme included in the package which lists mist common
pitfals, but usually all of them should be fixed in current package
versions.

   What kind of collateral damage does this
 pagkage cause, if any?
Well the worst thing is probably that your resolving doesn't work for
some time and you'll have to remove the package again...


Cheers,
Chris.


smime.p7s
Description: S/MIME cryptographic signature


Re: Does Postfix cache resolv.conf?

2010-01-11 Thread Dr. Lars Hanke


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.



Re: Does Postfix cache resolv.conf? [SOLVED]

2010-01-11 Thread Dr. Lars Hanke

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? [SOLVED]

2010-01-11 Thread Glenn English

On Jan 11, 2010, at 4:23 PM, Dr. Lars Hanke wrote:

 It's exactly this. The chroot has its own copy of (caches) resolv.conf.

And the command 'postfix check' will tell you if there's a problem (my server 
just now):

 r...@server# postfix check

 postfix/postfix-script: warning: /var/spool/postfix/etc/hosts and /etc/hosts 
 differ

-- 
Glenn English
g...@slsware.com





Re: Does Postfix cache resolv.conf? [SOLVED]

2010-01-11 Thread Christoph Anton Mitterer
On Tue, 2010-01-12 at 00:23 +0100, Dr. Lars Hanke wrote:
 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.

Using the resolvconf package, should solve your problems, the Debian
postfix package ships rules for resolvconf in order to automatically
update the chroot resolv.conf.


Cheers,
Chris.


smime.p7s
Description: S/MIME cryptographic signature


Re: Does Postfix cache resolv.conf?

2010-01-10 Thread Stefan Foerster
* Dr. Lars Hanke l...@lhanke.de:
 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)

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.

I guess what happened is:

1. You didn't disable smtpd's chroot in master.cf.
2. You changed /etc/resolv.conf without copying it to the chroot.
3. You restarted Postfix using Debian's init script which copied the
   changed resolv.conf file to the chroot.


Stefan


Re: Does Postfix cache resolv.conf?

2010-01-10 Thread John Peach
On Sun, 10 Jan 2010 11:32:34 +0100
Dr. Lars Hanke l...@lhanke.de wrote:

 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?

This is true of most services, not just postfix. They will
read /etc/resolv.conf at startup and not again unless told to do so


-- 
John


Re: Does Postfix cache resolv.conf?

2010-01-10 Thread Wietse Venema
Dr. Lars Hanke:
 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.

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.

Wietse