OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
Re: why every minute: "reload configuration /etc/postfix" - SOLVED

From: Arne Hoffmann (arnefish.in-berlin.de)
Date: Thu May 08 2008 - 12:43:59 CDT


Andy Spiegl wrote:
> I found the culprit: bind9 causes postfix to reload.
>
> The whole problem is a combination with a watchdog that checks whether
> bind is running correctly. It uses "rndc status" which seems to have
> a bug in Debian 4.0:
> # rndc status
> rndc: symbol lookup error: /usr/lib/libbind9.so.0: undefined symbol: isc_net_pton

rootnell:~# cat /etc/debian_version
4.0
rootnell:~# rndc status
number of zones: 6
debug level: 0
xfers running: 0
xfers deferred: 0
soa queries in progress: 0
query logging is OFF
recursive clients: 0/1000
tcp clients: 0/100
server is up and running
rootnell:~#

Your system is broken.

> As this test fails, it kills and restarts bind.

1) watchdog can check your system with a *custom* script. Config parameter:
    'test-binary = /path/to/script'. There is no test-binary in the default config.

2) In case of a problem (return code of test-binary != 0) watchdog executes
    a 'repair-binary'.

3) By default there is no repair-binary configured, but there is an
    *example* script: /usr/share/doc/watchdog/examples/repair.sh

> The only part that I still don't understand (but doesn't matter anymore):
> How are bind and postfix connected???

4) the repair-binary is called with the exit code of the test-binary. In
    case of repair.sh: If $1 is 100 or 101 it basically does a
    '/etc/init.d/networking restart'. This leads to the execution of
    /etc/network/if-down.d/postfix which in turn leads to a 'postfix
    reload'.

5) The command 'rndc status' doesn't appear in watchdogs default config or
    in one of the supplied example scripts. Somebody wrote a custom
    test-binary an screwed up.