[Mailman-Users] genaliases not updating aliases file

Mark Sapiro mark at msapiro.net
Sat Sep 1 04:13:00 CEST 2012

On 8/31/2012 5:20 PM, Maria McKinley wrote:
> I am having difficulty getting genaliases to work. When I run it, it
> outputs a list of my mailing lists, but it does not change the file
> /var/lib/mailman/data/aliases or aliases.db

If you want to use aliases and have genaliases update files, you must have

MTA = 'Postfix'

(uncommented) in mm_cfg.py.

> I am using postfix, and have the following in my main.cf file
> alias_maps = hash:/etc/aliases, ldap:ldapdata,
> hash:/var/lib/mailman/data/aliases
> alias_database = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases
> virtual_alias_maps = hash:/etc/postfix/virtual,
>         hash:/var/lib/mailman/data/virtual-mailman
> virtual_alias_domains = $virtual_alias_maps

What do you have in Postfix's transport maps?

> I believe when I set this up I was not using virtual aliases, but can't
> find documentation on this anymore, and not sure how to tell for sure. I
> think it does not matter if I do or not, since I only have one domain
> that I am using for mailman. I am using postfix-to-mailman.py, since I
> have this line in /etc/postfix/master.cf
> mailman   unix  -       n       n       -       -       pipe
>   flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
>   ${nexthop} ${user}

Defining the transport doesn't mean it's used. Do you have an entry like

lists.shadlen.org   mailman:

in /etc/postfix/transport?

(sigh...) second time this week ...

Please read the posts at
<http://mail.python.org/pipermail/mailman-users/2012-August/073993.html>, <http://mail.python.org/pipermail/mailman-users/2012-August/073994.html>

> In postfix-to-mailman.py it gives instructions for virtual aliases, but
> not for non-virtual aliases, so maybe now I have to use virtual aliases
> if I am using postfix-to-mailman.py?

The "officially unsupported by the GNU Mailman project", 3rd party
postfix_to_mailman.py delivery method is an alternative to and
incompatible with aliases.

> I am confused by somewhat conflicting documentation. In mm_cfg.py, it says:

Talk to Debian/Ubuntu about this.

> In mm_cfg.py, it says:
> # Uncomment if you use Postfix virtual domains (but not
> # postfix-to-mailman.py), but be sure to see
> # /usr/share/doc/mailman/README.Debian first.
> #MTA='Postfix'
> But then in postfix-to-mailman.py, it says
> # /etc/mailman/mm_cfg.py
> #    MTA = Postfix # So that mailman generates the recipients table

I *think* that the Debian/Ubuntu package with postfix_to_mailman.py uses
the Mailman generated virtual-mailman file (created with

MTA = 'Postfix'
POSTFIX_STYLE_VIRTUAL_DOMAINS = ['lists.shadlen.org']

in mm_cfg.py) as a recipient_maps table, not as virtual_alias_maps. My
mind boggles at the nonsensical nature of all this. The only point (and
it's a weak one) of using postfix_to_mailman.py in the first place is so
you don't have to rely on Mailman's generation of aliases and
virtual_alias_maps, but then they (Debian) turn around and rely on
Mailman to generate a virtual alias map which they use as a relay
recipient map to stop non-list mail from getting to the 'mailman' transport.

> The README was not particularly helpful in this case.
> The stuff for mailman in main.cf (in addition to the alias stuff above) is
> # stuff for mailman
> relay_domains = lists.shadlen.org
> transport_maps = hash:/etc/postfix/transport
> mailman_destination_recipient_limit = 1
> I have this in /etc/postfix/transport:
> lists.example.com   mailman:
> Can anyone help make sense of this?

Unfortunately, Yes.

The basic thing you have to decide is whether to use
postfix_to_mailman.py or Mailman's Postfix integration.

        - doesn't require aliases
        - at least as originally intended without relay_recipient_maps,
          once it's working it continues to work as lists are created
          and deleted
        - no support from the people who distribute it in their package
          (why else are you here?)
        - required a dedicated domain for mailing lists
        - does not support non-list addresses in the dedicated domain
        - triggers grumpy rants when you ask for help on this list.
Mailman - Postfix integration:
        - documented and supported by the GNU Mailman project.
        - works well in hundreds if not thousands of Mailman
        - allows multiple list domains, both local and virtual.
        - allows non-list addresses in list domains
        - you tell me. Maybe it doesn't work or is hard to
          configure in some arcane Postfix configurations.

Mark Sapiro <mark at msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan

More information about the Mailman-Users mailing list