[Mailman-Users] Automatic newlist integration with Postfix'srelay_recipient_maps

Mark Sapiro mark at msapiro.net
Sat Oct 3 02:18:56 CEST 2009

Roman Medina-Heigl Hernandez wrote:
>I'd like to know if the following (known) problem is solved... The question
>is simple: how to integrate mailman with postfix in a secure way (no
>backscattering!!!) so that I could create a new list via mailman's UI
>*without* having to manually re-create (& refresh) a relay_recipient_maps
>(hash) file?

If your lists are all in domains in POSTFIX_STYLE_VIRTUAL_DOMAINS, you
can use hash:/path/to/data/virtual-mailman as a relay_recipient_maps

>AFAIK, genaliases output is not valid for this task since
>relay_recipient_maps expects something like:
>user at domain.tld
>user2 at domain2.tld
>(i.e. it should contain full email addresses, while genaliases generates
>only usernames without the domain part).

That's true of aliases, but not of virtual-mailman.

>Any optimal solution for this?
>I think some people has his/her own script to build the recipient_maps by
>processing genaliases output, but it seems a bit "dirty" for me...
>Moreover, I'm using mailman's virtualhosts so it should calculate the right
>(virtual) domain for all existant lists. If that's the only solution I'd
>also like to have a look to your scripts.

If you are using POSTFIX_STYLE_VIRTUAL_DOMAINS for all your lists as
discussed in the installation manual at
<http://www.list.org/mailman-install/postfix-virtual.html>, then you
already have data/virtual-mailman(.db) that can be used for

If you are not using POSTFIX_STYLE_VIRTUAL_DOMAINS at all, you can put
all your list domains in the POSTFIX_STYLE_VIRTUAL_DOMAINS = [...]
list in mm_cfg.py, and use the resultant data/virtual-mailman(.db) as

The only problem may be if you are currently using
POSTFIX_STYLE_VIRTUAL_DOMAINS for some but not all list domains. In
that case, data/virtual-mailman won't contain all the list addresses,
and if you augment POSTFIX_STYLE_VIRTUAL_DOMAINS so it does, that may
adversely affect the use of data/virtual-mailman in virtual_alias_maps.

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