postfix-users October 2010 archive
Main Archive Page > Month Archives  > postfix-users archives
postfix-users: Re: intermittent hang on "postfix stop"

Re: intermittent hang on "postfix stop"; doesn't return "terminating on signal"

From: Victor Duchovni <Victor.Duchovni_at_nospam>
Date: Fri Oct 15 2010 - 14:12:23 GMT

On Fri, Oct 15, 2010 at 06:43:56AM -0700, Scott Brown wrote:

> The lists of email addresses are in these virtual files,
> defined with this line in
> virtual_alias_maps =
> hash:$config_directory/usermanaged/,
> hash:$config_directory/usermanaged/
> I have a script called that runs every half an hour which
> shuts down postfix, runs postmap on the virtual alias files, and
> then restarts postfix.

This is a terrible idea, there is no need to restart Postfix when changing
lookup tables. For better atomicity, build the new table under a temporary
file name and then rename (not copy) the temp .db file to the desired
final name.

If your master(8) hangs in SIGTERM, it is likely because of mutex locks
in the Linux syslog C-library interface. Work-arounds were added into
Postfix for this in late 2006, and are in official releases starting
with 2.4.0.

Don't restart Postfix every 30 minutes, this is a really bad idea,
it destroys queue-manager performance and fairness quarantees.

Do upgrade to 2.4 or later, if your Postfix is older, but don't test
the new re-entrant shutdown logic every 30 minutes.

-- Viktor.