why every minute: "reload configuration /etc/postfix"

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
26 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: why every minute: "reload configuration /etc/postfix" - SOLVED

Ralf Hildebrandt
* Ralf Hildebrandt <[hidden email]>:
> * Bill Cole <[hidden email]>:
>
> > You cited /etc/init.d/bind9, which is not part of ISC BIND v9 but rather
> > (probably) a shell script provided by whoever packaged your installation.
>
> I'm about to look at that box real soon now. Relax.
> I hope I'll find it.

I used strace on the postfix/master to find why it
was restarting. Something was sending it a SIGHUP.

I finally found:
/etc/default/bind9
which said:

OPTIONS="-u bind"
# Set RESOLVCONF=no to not run resolvconf
RESOLVCONF=yes

Resolvconf does this:

Overwrite (-a) or delete (-d) the nameserver information record for
network interface INTERFACE and run the update scripts in
/etc/resolvconf/update.d/ if the nameserver information has changed.

A named/BIND9 restart/stop/start did always invoke:
echo "nameserver 127.0.0.1" | /sbin/resolvconf -a lo.named
and this caused postfix to be signalled by resolvconf (after all, the
resolv.conf changed!)

--
Ralf Hildebrandt ([hidden email])          [hidden email]
Postfix - Einrichtung, Betrieb und Wartung       Tel. +49 (0)30-450 570-155
http://www.arschkrebs.de
Do you think I could buy back my introduction to you? - Groucho Marx
Reply | Threaded
Open this post in threaded view
|

Re: why every minute: "reload configuration /etc/postfix" - SOLVED

Wietse Venema
Ralf Hildebrandt:
> A named/BIND9 restart/stop/start did always invoke:
> echo "nameserver 127.0.0.1" | /sbin/resolvconf -a lo.named
> and this caused postfix to be signalled by resolvconf (after all, the
> resolv.conf changed!)

Where does that brain damage come from? Is /sbin/resolvconf
still a shell script? If so, have a look.

        Wietse
Reply | Threaded
Open this post in threaded view
|

Re: why every minute: "reload configuration /etc/postfix" - SOLVED

Bill Cole-3
In reply to this post by Ralf Hildebrandt
At 4:30 PM +0200 5/9/08, Ralf Hildebrandt wrote:
[...]
>A named/BIND9 restart/stop/start did always invoke:
>echo "nameserver 127.0.0.1" | /sbin/resolvconf -a lo.named
>and this caused postfix to be signalled by resolvconf (after all, the
>resolv.conf changed!)

This wanders back into Postfix relevance perhaps...

Is there really some reason that one would want to restart/reload
Postfix arbitrarily on all resolv.conf changes?  It seems to me that
this would be a judgment call, since so many of the things one
*might* do to resolv.conf would not cause trouble for whatever
persistent or semi-persistent DNS state Postfix might be retaining.

I don't oppose allowing admins to be lazy when it is feasible, but
this strikes me as a case where sparing root from engaging in a small
amount of thought could be somewhat expensive.

--
Bill Cole
[hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: why every minute: "reload configuration /etc/postfix" - SOLVED

Wietse Venema
Bill Cole:

> At 4:30 PM +0200 5/9/08, Ralf Hildebrandt wrote:
> [...]
> >A named/BIND9 restart/stop/start did always invoke:
> >echo "nameserver 127.0.0.1" | /sbin/resolvconf -a lo.named
> >and this caused postfix to be signalled by resolvconf (after all, the
> >resolv.conf changed!)
>
> This wanders back into Postfix relevance perhaps...
>
> Is there really some reason that one would want to restart/reload
> Postfix arbitrarily on all resolv.conf changes?  It seems to me that
> this would be a judgment call, since so many of the things one
> *might* do to resolv.conf would not cause trouble for whatever
> persistent or semi-persistent DNS state Postfix might be retaining.

On a client box, maybe.

On a production server, definitely not.

Postfix network processes are by design short-lived so they pickup
resolv.conf and other changes on the fly. Unless the machine is
only up for a few minutes at a time, Postfix will push out the mail
eventually anyway.

> I don't oppose allowing admins to be lazy when it is feasible, but
> this strikes me as a case where sparing root from engaging in a small
> amount of thought could be somewhat expensive.

I think this is a result of peecee mentality.

        Wietse
Reply | Threaded
Open this post in threaded view
|

Re: why every minute: "reload configuration /etc/postfix" - SOLVED

Harald Koch-2
In reply to this post by Wietse Venema
Wietse Venema wrote:

> Ralf Hildebrandt:
>  
>> A named/BIND9 restart/stop/start did always invoke:
>> echo "nameserver 127.0.0.1" | /sbin/resolvconf -a lo.named
>> and this caused postfix to be signalled by resolvconf (after all, the
>> resolv.conf changed!)
>>    
>
> Where does that brain damage come from? Is /sbin/resolvconf
> still a shell script? If so, have a look.
>  

Sounds to me like part of a "laptop mode" configuration, where the
system automatically reconfigures itself to match changes in network
location. As has been mentioned elsewhere, this can be useful for
clients, but should be disabled on servers. (set "RESOLVCONF=no" in the
config :).

/sbin/resolvconf should probably be made smarter, i.e. only signal if
the file contents have actually changed. Which is how I usually write my
scripts... )

--
Harald

Reply | Threaded
Open this post in threaded view
|

Re: why every minute: "reload configuration /etc/postfix" - SOLVED

Ralf Hildebrandt
* Harald Koch <[hidden email]>:

> Sounds to me like part of a "laptop mode" configuration, where the system
> automatically reconfigures itself to match changes in network location. As
> has been mentioned elsewhere, this can be useful for clients, but should
> be disabled on servers. (set "RESOLVCONF=no" in the config :).

Or better still: Simply deinstall resolvconf :)
--
Ralf Hildebrandt ([hidden email])          [hidden email]
Postfix - Einrichtung, Betrieb und Wartung       Tel. +49 (0)30-450 570-155
http://www.arschkrebs.de
A cheap hammer can drive in more nails than a top of the line screwdriver.
12