genaliases on Postfix is inefficient and can cause bounces

Bug #266408 reported by Cedders-users on 2007-10-09
This bug affects 2 people
Affects Status Importance Assigned to Milestone
GNU Mailman
Mark Sapiro

Bug Description

We're running Mailman 2.1.5-8sarge5 and Postfix 2.1.5-9 on a mail server
with a few hundred lists. For reasons described on Bug [ 1809697 ], we run
genaliases as a cron job.

While genaliases is running, incoming posts and admin mail to some lists
can bounce, with "550 User unknown in virtual alias table". It appears
that genaliases loops over all lists and calls
MTA.create(mlist, nolock=True, quiet=quiet)
for each list, which in turn calls _update_maps() which runs Postfix's
postmap and postalias commands. Hence for a time while running genaliases
the list of mappings loaded into Postfix is incomplete. The process can
also take over a minute because of this repeated hashing.

Suggested fix (would patch on Bazaar but repository is empty :) -
add "if not nolock:" before
in Mailman/MTA/

and call "MTA.create(None, quiet=quiet)" once more before
in bin/genaliases


Cedders-users (cedders-users) wrote :

Originator: YES

The issue also appears to be present in 2.1.9.

Mark Sapiro (msapiro) wrote :

> and call "MTA.create(None, quiet=quiet)" once more before
> os.umask(omask)
> in bin/genaliases

Has this been tested? It looks like this will be a deadlock because genaliases has the lock at this point and MTA,create tries to obtain it. It seems that things need to be rearranged to

        MTA.create(None, quiet=quiet)

Changed in mailman:
assignee: nobody → Mark Sapiro (msapiro)
milestone: 2.1-stable → 2.1.15
status: New → In Progress
Mark Sapiro (msapiro) on 2011-04-16
Changed in mailman:
status: In Progress → Fix Committed
Cedders (cedric-gn) wrote :

Very good. I don't recall testing it, and wonder if it needs further testing with MTAs other than Postfix.

BTW the reference to Bug [ 1809697 ] is now launchpad bug 266407.

Mark Sapiro (msapiro) wrote :

It was tested with MTA = 'Manual' and MTA = 'Postfix' (the only supplied MTA modules) before being committed.

Mark Sapiro (msapiro) on 2012-06-15
Changed in mailman:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers