As I say below in Comment #1, "I do not recommend people follow this article. I do not recommend which is a 3rd party module neither distributed nor officially supported by the GNU Mailman project." If that isn't enough to stop you, read the Warning in Sec 4 and the complete comment # 1. /Mark Sapiro, Mailman core developer and primary MM 2.1.x supporter.

This instruction set is written for those who wish to integrate Mailman with the postfix MTA.  The documentation currently available does not cover in detail how to use virtual hosts and MySQL-based aliases.

Please note: The instructions here are based on the Ubuntu 10.10 Linux distribution, loaded on a VPS.  Specific file locations may differ.

Before beginning, postfix should be installed and working correctly.  If you are using or plan to use virtual hosts, set this up prior to installing and configuring Mailman.

Normal postfix Integration

If you do not have any subdomains or do not plan on using virtual hosts within postfix, follow the steps below to integrate Mailman with your system.

  1. Add this to the bottom of the $prefix/Mailman/ file:

    MTA = 'Postfix' Please note that depending on your specific distribution, this setting may be set within $prefix/Mailman/

  2. Run the following command to initialize your mailman aliases:

    $prefix/bin/genaliases The command creates two files: aliases and aliases.db. These files are usually created within $prefix/data, but may be located elsewhere, depending on your configuration. They may sometimes be found within /var/lib/mailman/data.

  3. Make sure that the owner and group owner of these files are set to mailman

postfix with Virtual Domains (hash map)

Let's assume you have several domains (in this case and and you plan on hosting mailman on and  You will have to select a default domain you want to host mailman on.  It doesn't really matter which one you choose but remember that it will be the one where everyone will come to administer their lists.  In this case, I will select

  1. Within $prefix/Mailman/ file, add the following lines below the MTA line you inserted above:
  2. Change DEFAULT_EMAIL_HOST and DEFAULT_URL_HOSTto match your default domain:

    # Default domain for email addresses of newly created MLs
    # Default host for web interface of newly created MLs
    # Update VIRTUAL_HOSTS for the above
  3. Save and close and run $prefix/bin/genaliases, taking care to make sure that the resulting alias files are readable by postfix.
  4. Next, modify your postfix configuration to include mailman aliases.  Within, add the resulting alias files:
    virtual_alias_maps = mysql:/etc/postfix/virtual/,
    alias_maps = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases


    The above additions to virtual_alias_maps and alias_maps are not used by and can potentially cause conflicts within Postfix over delivery of mail to Mailman. The GNU-Mailman project recommends the methods outlined in section 6.1.1 and section 6.1.2 of the Installation Manual for integrating Postfix and Mailman with virtual domains.

  5. Save and close Open the file. If not already included, add the mailman service to the end of the file:
    # ==========================================================================
    # service type  private unpriv  chroot  wakeup  maxproc command + args
    #               (yes)   (yes)   (yes)   (never) (100)
    # ==========================================================================
    mailman   unix  -       n       n       -       -       pipe
      flags=FR user=list argv=/usr/lib/mailman/bin/
      ${nexthop} ${user
  6. Save and close Open your transport file. By default, this file should be located within the same directory as your and files. Add the following lines:   mailman:   mailman:
  7. Run postmap -v on the transport file.
  8. Restart mailman and postfix

You will not be able to create lists using the web interface. New lists must use the $prefix/bin/newlist command.


Mark Sapiro

I do not recommend people follow this article. I do not recommend which is a 3rd party module neither distributed nor officially supported by the GNU Mailman project. I also don't understand what is lacking in the official installation manual ("the documentation currently available" link at the beginning of this article, and I don't understand why there would be anything in even these instructions that would prevent them working with lists created via the web interface as long as the permissions are correct on Mailman's data/aliases and data/virtual-mailman files which aren't even used by anyway.

MailmanWiki: DOC/Integrating Mailman with postfix (last edited 2014-07-21 18:55:48 by msapiro)