Differences between revisions 1 and 3 (spanning 2 versions)
Revision 1 as of 2010-05-03 17:43:21
Size: 2311
Editor: msapiro
Comment:
Revision 3 as of 2010-05-10 06:19:57
Size: 2635
Editor: msapiro
Comment: added "may be unnecessary" note.
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
#pragma page-filename DOC/versions/10715240 #pragma page-filename DOC/versions/11075594
Line 10: Line 10:

Also, this whole process may be unnecessary. According to [[http://mail.python.org/pipermail/mailman-users/2010-May/069386.html|this thread on the mailman-users list]] simply referencing the Mailman generated virtual-mailman in virtual_alias_maps in Postfix is sufficient even if the domain is a virtual_mailbox_domain.
Line 39: Line 41:
 1. Run Mailman's bin/genaliases. This will create/update the following
files in /path/to/data/:
  aliases
  aliases.db
virtual-mailman
  transport-mailman
transport-mailman.db
Make sure transport-mailman and transport-mailman.db have permissions
like aliases and aliases.db. In particular, transport-mailman.db must be
readable by Postfix. From now on, these files will be maintained
automatically by Mailman as lists are created and deleted.
 1. Run Mailman's bin/genaliases. This will create/update the following files in /path/to/data/:
. aliases
. aliases.db
.
virtual-mailman
. transport-mailman
.
transport-mailman.db
Make sure transport-mailman and transport-mailman.db have permissions like aliases and aliases.db. In particular, transport-mailman.db must be readable by Postfix. From now on, these files will be maintained automatically by Mailman as lists are created and deleted.

Mailman can be configured to automatically generate list aliases for Postfix, and this process can also be hijacked to generate aliases automatically for sendmail.

Mailman can also be additionally configured to automatically generate virtual alias mappings for postfix.

Some people find these features insufficient as they want to have Mailman lists in a domain which is a postfix virtual_mailbox_domain. This can be done by using transport_maps rather than virtual_alias_maps for the Mailman addresses in that domain. The following is a way to automate that.

The following is based on email exchanges and is believed to work, but the author has not personally tested it.

Also, this whole process may be unnecessary. According to this thread on the mailman-users list simply referencing the Mailman generated virtual-mailman in virtual_alias_maps in Postfix is sufficient even if the domain is a virtual_mailbox_domain.

  1. Put the list domain(s) in POSTFIX_STYLE_VIRTUAL_DOMAINS in mm_cfg.py just as if they were going to be virtual_alias_domains.
  2. Do not put the domains in Postfix virtual_alias_domains, and do not put hash:/path/to/data/virtual_mailman in virtual_alias_maps.
  3. Create /path/to/data/virtual_to_transport with the following content

sed -r -e 's/(^[^#][^ \t]+[ \t]+).+$/\1local/' $1 \
 > /path/to/data/transport-mailman
/usr/sbin/postmap /path/to/data/transport-mailman
  1. Then

chgrp mailman /path/to/data/virtual_to_transport
chmod 750 /path/to/data/virtual_to_transport

If your Mailman group is not 'mailman', put the actual group in the chgrp command.

  1. Put

POSTFIX_MAP_CMD = '/path/to/data/virtual_to_transport'

in mm_cfg.py

  1. Run Mailman's bin/genaliases. This will create/update the following files in /path/to/data/:

. aliases . aliases.db . virtual-mailman . transport-mailman . transport-mailman.db Make sure transport-mailman and transport-mailman.db have permissions like aliases and aliases.db. In particular, transport-mailman.db must be readable by Postfix. From now on, these files will be maintained automatically by Mailman as lists are created and deleted.

  1. Add "hash:/path/to/data/transport-mailman" to transport_maps in main.cf.
  2. Reload Postfix to pick up the main.cf changes.

MailmanWiki: DOC/Mailman - Postfix integration with lists in virtual_mailbox_domains (last edited 2010-11-25 12:32:47 by msapiro)