1. Home
  2. Tutorials
  3. Mailman
Yolinux.com Tutorial

Linux: GNU Mailman Email list installation and configuration

Mailman is a server based email list and web based list member management software. It allows list users to send a single email to the list email address (i.e. list@orgname.com) and all members on the list will recieve the email. It is a great communications tool for the disemination of information and for discussion among list members. Mailman will also save list emails for archive and viewing via the web. A full featured email web gui is also provided for list members and list administrators.

This tutorial covers the use of GNU Mailman with the server's MTA email server (e.g. sendmail or postfix) and apache web server residing on the same system. When Mailman recieves an email for distribution to the list, it then uses the server's email server program (MTA) as the outgoing mail server. Mailman administration and configuration is available from a web based GUI which is enabled by the apache web server.

For other YoLinux eMail tutorials see:

  1. MTA or Mail Transfer Agents - sendmail, qmail, etc - Links/Info
  2. Mail Retrieval Software - pop3, imap, etc - Links/Info
  3. Mail User Agent (MUA): E-Mail client - Netscape, MUTT, etc - Links/Info

Mailman Installation:

This installation assumes the use of the Apache web server, sendmail and Python.

Red Hat/Fedora/CentOS: The simplest method for installing Mailman on a Red Hat based server is by using an RPM or use YUM to install an RPM obtained from a YUM server.

rpm -ivh mailman-X.X.X-X.i386.rpm
or
yum install mailman

Ubuntu / Debian: apt-get install mailman


If building from source: (I never did it this way.)

./configure --prefix=/var/mailman
         
make install

Compile wrappers: mailman-2.0.8/src/alias-wrapper.c, cgi-wrapper.c, mail-wrapper.c

Mailman source is available from:


Red Hat/CentOS RPM package notes:

  • The Red Hat RPM of Mailman integrates with the Red Hat sendmail RPM which requires a wrapper to interface with it while it executes. The smrsh (sendmail restricted shell) wrapper is installed by the RPM in:
    • RHEL5/CentOS5/Fedora Core 3: /etc/smrsh/mailman (soft linked to /usr/lib/mailman/mail/mailman)
      Note: The directory /etc/smrsh is the location of the restricted shell programs which are to interface with sendmail.
    • Red Hat 9.0: /etc/smrsh/mailman (soft linked to /var/mailman/mail/mailman)
      Note: The directory /etc/smrsh is the location of the restricted shell programs which are to interface with sendmail.
    • Red Hat 7.1: /etc/smrsh/wrapper (soft linked to /var/mailman/mail/wrapper)
    • Debian restricted shell directory: /usr/admin/sm.bin

  • Documentation will be installed in: (local system file)

  • Icons for the web interface are placed in /var/www/icons/ (PythonPowered.png,gnu-head-tiny.jpg,mailman-large.jpg,mailman.jpg)

  • RPM installs the rest of mailman in /var/mailman
    Red Hat 9.0 / Mailman 2.1.1 introduces:
    • a daemon init script: /etc/rc.d/init.d/mailman
    • logrotate support: /etc/logrotate.d/mailman
    • Apache 2.0/2.2 conf.d support: /etc/httpd/conf.d/mailman.conf
Note: RPM's use to (circa RH9) install to /var/mailman. This does not conform to the newer Filesystem Hierarchy Standard (FHS) used by Fedora Core 3 and later and also conflicts with SELinux security.
Mailman now installs to:
  • /etc/mailman/...
  • /usr/lib/mailman/...
  • /var/spool/mailman/...
  • /var/lock/mailman/...
  • /var/run/mailman/...
  • /var/log/mailman/...
  • /usr/share/doc/mailman-*

Ubuntu package notes:

Installs to:
  • Installed software package: /usr/lib/mailman/
  • CGI: /usr/lib/cgi-bin/mailman/
  • Configuration documentation: /usr/share/doc/mailman/
  • Log files: /usr/log/mailman/
  • User data: /var/lib/mailman/
  • Runtime lock file: /var/lock/mailman/
  • Location of process id file: /var/run/mailman/
  • Configuration files located in this directory: /etc/mailman/
  • Start script: /etc/init.d/mailman
  • Admin commands: /usr/sbin/

Check file and directory permissions of installation: /usr/sbin/check_perms
Use check_perms -f to fix permission problems.
Manual fix: chown -R list.list /var/lib/mailman/*

Mailman Configuration Files:
  • Create a site admin password: /usr/lib/mailman/bin/mmsitepass your-supersecret-password

  • Config file: use /usr/lib/mailman/Mailman/mm_cfg.py
    (to override defaults set in /usr/lib/mailman/Mailman/Defaults.py)
    ..
    ...
    
    DEFAULT_URL_HOST   = 'my-domain.com'
    DEFAULT_EMAIL_HOST = 'my-domain.com'
    DELIVERY_MODULE = 'SMTPDirect'
    ...
    ..
                          

    Mailman DirectiveDescription
    DEFAULT_URL_HOST=fqdn Set host to machine "fully qualified domain name". Red Hat default.
    DEFAULT_URL_HOST='my-domain.com' Set host to specific or virtual machine domain name.
    DEFAULT_EMAIL_HOST=fqdn Set email host to machine "fully qualified domain name". Red Hat default.
    DEFAULT_EMAIL_HOST='email.my-domain.com' Set email host to machine "fully qualified domain name".
    DELIVERY_MODULE='SMTPDirect'Set the email server program. "SMTPDirect" sends email directly to the destination server. Red Hat default.
    DELIVERY_MODULE='Sendmail'Set mail using the email server program "Sendmail".

  • Other config files:
    • /usr/lib/mailman/Mailman/Defaults.py - System defaults. Don't change here, override in /usr/lib/mailman/Mailman/mm_cfg.py
    • /etc/mailman/sitelist.cfg - Mailman behavior and settings.
    • /etc/mailman/mm_cfg.py is a softlink to /usr/lib/mailman/Mailman/mm_cfg.py

Create Mailing Lists:

RHE5 / CentOS 5 / Fedora Core 3,4,5,6 / Mailman 2.1.5 RPM:
  • Generate default list "mailman":
    This requires the manual creation of the default list "mailman" and the entry for the aliases file:
    [root prompt]#  /usr/lib/mailman/bin/newlist mailman        - Creates a mailing list called mailman.
                   Enter the email address of the person running the list:  admin@supermegacorp.com
                   Initial mailman password:    - Type it correctly. There is no verification!
                 
    This will generate "aliases" entry to cut and paste to your MTA aliases file (see Sendmail or Postfix configurations below).

  • Generate test email list: /usr/lib/mailman/bin/newlist test
    Test with a list of one or two of your own email addresses.

  • Generate additional email list: /usr/lib/mailman/bin/newlist distrolist1

  • Generate additional email list: /usr/lib/mailman/bin/newlist distrolist2

Sendmail Configuration:
  • Create the default list "mailman": (as root)
    • RHE5 / CentOS 5 / Fedora Core 3,4,5,6 / Mailman 2.1.5 RPM:
      This requires the manual creation of the default list "mailman" and the entry for the aliases file:
      [root prompt]#  /usr/lib/mailman/bin/newlist mailman        - Creates a mailing list called mailman.
                     Enter the email address of the person running the list:  admin@supermegacorp.com
                     Initial mailman password:    - Type it correctly. There is no verification!
                   
      This will generate "aliases" entry to cut and paste to the file /etc/aliases (Sendmail)
      (Note: can also be generated with the command /usr/lib/mailman/bin/genaliases)
      ## mailman mailing list
      mailman:              "|/usr/lib/mailman/mail/mailman post mailman"
      mailman-admin:        "|/usr/lib/mailman/mail/mailman admin mailman"
      mailman-bounces:      "|/usr/lib/mailman/mail/mailman bounces mailman"
      mailman-confirm:      "|/usr/lib/mailman/mail/mailman confirm mailman"
      mailman-join:         "|/usr/lib/mailman/mail/mailman join mailman"
      mailman-leave:        "|/usr/lib/mailman/mail/mailman leave mailman"
      mailman-owner:        "|/usr/lib/mailman/mail/mailman owner mailman"
      mailman-request:      "|/usr/lib/mailman/mail/mailman request mailman"
      mailman-subscribe:    "|/usr/lib/mailman/mail/mailman subscribe mailman"
      mailman-unsubscribe:  "|/usr/lib/mailman/mail/mailman unsubscribe mailman"
          
                            
      Run newaliases to process the aliases file (Sendmail).

      Virtual hosting notes: (multiple domains on a single system)
      • The command /usr/lib/mailman/bin/newlist can take the domain as an argument.
        i.e. /usr/lib/mailman/bin/newlist --language=en --urlhost=www.mydomain.com mailman
        where www.mydomain.com is the URL to the list and is a key in mm_cfg.py or Defaults.py
        For a full list of options see: /usr/lib/mailman/bin/newlist --help
      • Virtual domains are specified as a key-value pair:
        add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST)
      • Defaults are specified with the directives DEFAULT_EMAIL_HOST and DEFAULT_URL (specified in /usr/lib/mailman/Mailman/mm_cfg.py)
      • List names are forced to lower case.
    • Red Hat 9.0 / Mailman 2.0.8 RPM:
      This requires the manual creation of the default list "mailman" and the entry for the aliases file:
      [root prompt]# cd /var/mailman
      [root prompt]# bin/newlist mailman        - Creates a mailing list called mailman.
                     Enter the email address of the person running the list:
                     Initial mailman password:    - Type it correctly. There is no verification!
          
      Cut and paste entry to the file /etc/aliases
      ## mailman mailing list
      mailman:              "|/var/mailman/mail/mailman post mailman"
      mailman-admin:        "|/var/mailman/mail/mailman admin mailman"
      mailman-bounces:      "|/var/mailman/mail/mailman bounces mailman"
      mailman-confirm:      "|/var/mailman/mail/mailman confirm mailman"
      mailman-join:         "|/var/mailman/mail/mailman join mailman"
      mailman-leave:        "|/var/mailman/mail/mailman leave mailman"
      mailman-owner:        "|/var/mailman/mail/mailman owner mailman"
      mailman-request:      "|/var/mailman/mail/mailman request mailman"
      mailman-subscribe:    "|/var/mailman/mail/mailman subscribe mailman"
      mailman-unsubscribe:  "|/var/mailman/mail/mailman unsubscribe mailman"
                             
    • The Red Hat 7.1 / Mailman 2.0.8 RPM creates two sendmail aliases in the file /etc/aliases
          mailman: postmaster
          mailman-owner: mailman
                          

  • The RPM creates a sendmail user. (and entries in the files /etc/passwd, /etc/shadow, /etc/gshadow, /etc/group)
    • Fedora Core 3:
          mailman:x:41:41:GNU Mailing List Manager:/usr/lib/mailman:/sbin/nologin    
    • Red Hat 9.0:
          mailman:x:41:41:GNU Mailing List Manager:/var/mailman:/sbin/nologin
                          
    • Red Hat 7.1:
          mailman:x:41:41:GNU Mailing List Manager:/var/mailman:/bin/false
                      

Also see the YoLinux.com Sendmail configuration tutorial.

Postfix Configuration:
  • Mailman config file: /etc/mailman/mm_cfg.py
    DEFAULT_URL_HOST=www.your-domain.com
    DEFAULT_EMAIL_HOST=mail.your-domain.com
    MTA = 'postfix'
    POSTFIX_STYLE_VIRTUAL_DOMAINS= ['your-domain.com', 'your-domain-2.com']
                 

  • Generate Mailman aliases file: /etc/mailman/aliases
    Place the aliases reults of the "newlist" command in /etc/mailman/aliases or generate using the command /usr/lib/mailman/bin/genaliases
    ## mailman mailing list
    mailman:              "|/usr/lib/mailman/mail/mailman post mailman"
    mailman-admin:        "|/usr/lib/mailman/mail/mailman admin mailman"
    mailman-bounces:      "|/usr/lib/mailman/mail/mailman bounces mailman"
    mailman-confirm:      "|/usr/lib/mailman/mail/mailman confirm mailman"
    mailman-join:         "|/usr/lib/mailman/mail/mailman join mailman"
    mailman-leave:        "|/usr/lib/mailman/mail/mailman leave mailman"
    mailman-owner:        "|/usr/lib/mailman/mail/mailman owner mailman"
    mailman-request:      "|/usr/lib/mailman/mail/mailman request mailman"
    mailman-subscribe:    "|/usr/lib/mailman/mail/mailman subscribe mailman"
    mailman-unsubscribe:  "|/usr/lib/mailman/mail/mailman unsubscribe mailman"
                 
    Run newaliases to process the aliases file.

    Virtual domains will require use of the "virtual_alias_maps" Postfix attribute:
    ## mailman mailing list virtual lists
    mailman@virtual-domain.com               "|/usr/lib/mailman/mail/mailman post mailman"
    mailman-admin@virtual-domain.com         "|/usr/lib/mailman/mail/mailman admin mailman"
    mailman-bounces@virtual-domain.com       "|/usr/lib/mailman/mail/mailman bounces mailman"
    mailman-confirm@virtual-domain.com       "|/usr/lib/mailman/mail/mailman confirm mailman"
    mailman-join@virtual-domain.com          "|/usr/lib/mailman/mail/mailman join mailman"
    mailman-leave@virtual-domain.com         "|/usr/lib/mailman/mail/mailman leave mailman"
    mailman-owner@virtual-domain.com         "|/usr/lib/mailman/mail/mailman owner mailman"
    mailman-request@virtual-domain.com       "|/usr/lib/mailman/mail/mailman request mailman"
    mailman-subscribe@virtual-domain.com     "|/usr/lib/mailman/mail/mailman subscribe mailman"
    mailman-unsubscribe@virtual-domain.com   "|/usr/lib/mailman/mail/mailman unsubscribe mailman"
                          
    Run postalias /etc/postfix/valias.txt to process the aliases file.

  • Edit /etc/postfix/main.cf:
    alias_maps = hash:/etc/aliases,/etc/mailman/aliases
    
    virtual_alias_maps = hash:/etc/postfix/valias.txt
                 
    The file /etc/mailman/aliases and /etc/mailman/aliases.db can be generated with the command /usr/lib/mailman/bin/genaliases which will create the aliases based on the mailing lists generated so far.
    Restart Postfix: service postfix reload

    The Red Hat/CentOS Postfix configuration uses two aliases files as defined in /etc/postfix/main.cf by the attributes "alias_maps" and "virtual_alias_maps". The installation default "alias_maps" is set to /etc/aliases. This will be expanded to include mailman aliases by adding the file /etc/mailman/aliases.

  • /usr/lib/mailman/bin/check_perms -f

Restart Postfix after re-configuration: service postfix reload

Also see the YoLinux.com Postfix configuration tutorial.

postalias manpage

Apache Configuration:
  • Apache configuration:
    • RHEL5/CentOS5/Fedora Core 3: (Apache 2.0/2.2) /etc/httpd/conf.d/mailman.conf
      ScriptAlias /mailman/ /usr/lib/mailman/cgi-bin/
      <Directory /usr/lib/mailman/cgi-bin/>
          AllowOverride None
          Options ExecCGI
          Order allow,deny
          Allow from all
      </Directory>
      
      Alias /pipermail/ /var/lib/mailman/archives/public/
      <Directory /var/lib/mailman/archives/public>
          Options Indexes MultiViews FollowSymLinks
          AllowOverride None
          Order allow,deny
          Allow from all
      </Directory>
      
      # Uncomment the following line, replacing www.example.com with your server's
      # name, to redirect queries to /mailman to the listinfo page (recommended).
      
      # RedirectMatch ^/mailman[/]*$ http://www.example.com/mailman/listinfo
              
      The last line of this file can be manually edited to match your domain. Default is to have the line commented out.

    • Red Hat 9.0: (Apache 2.0) /etc/httpd/conf.d/mailman.conf
      ScriptAlias /mailman/ /var/mailman/cgi-bin/
      <Directory /var/mailman/cgi-bin">
          AllowOverride None
          Options ExecCGI
          Order allow,deny
          Allow from all
      </Directory>
      
      Alias /pipermail/ /var/mailman/archives/public/
      <Directory /var/mailman/archives>
          Options +FollowSymlinks
      </Directory>
      
      # Redirect queries to /mailman to the listinfo page (recommended)
      RedirectMatch /mailman[/]*$ http://www.mega-corp.com/mailman/listinfo
              
      The last line of this file can be manually edited to match your domain. Default is to have the line commented out.
      [Potential Pitfall]: The Red Hat 9.0 install does NOT include the "Directory" statement for /var/mailman/cgi-bin. Add this in manually.

    • Red Hat 7.1: Apache configuration file additions: /etc/httpd/conf/httpd.conf
      ..
      ...
      ScriptAlias /mailman/ /var/mailman/cgi-bin/
      Alias /pipermail/ /var/mailman/archives/public/
      <Directory /var/mailman/archives>
          Options +FollowSymlinks
      </Directory>
      <Directory /var/mailman/cgi-bin">
          AllowOverride None
          Options +ExecCGI
          Order allow,deny
          Allow from all
      </Directory>
      ...
      ..
              
                  
    Restart the web server: service httpd restart (or: /etc/init.d/httpd restart)

SELinux Configuration:

The pre-configured Mailman policies should work.

There are three SELinux system security roles:
  • mailman_cgi_t
  • mailman_mail_t
  • mailman_queue_t
cron Configuration:
  • CRON: The file /var/spool/cron/mailman controls timed events:
    • Mail reminder to admins as to pending requests. (Daily)
    • Mail digests for lists that do periodic as well as threshhold delivery. (Daily)
    • Mail password reminders to list members. (Monthly)
    • News interface to mail is run every five minutes! By defaults this in on. Edit file and comment this line out if you are not using this feature. (You probably are not)
    • Manage archives. (Daily)
    • Retry failed mail deliveries. (Every minute)

    Changes are made to the file: (Defaults ok)

    • Fedora Core 3: /usr/lib/mailman/cron/crontab.in (group.owner root.mailman)
      (Also the init script will populate: /etc/cron.d/mailman)
      As root execute the following commands:
      [root prompt]# cd /usr/lib/mailman/cron
      [root prompt]# crontab -u mailman crontab.in
      This will create/update /var/spool/cron/mailman
    • Red Hat 7.1-9.0: /var/mailman/cron/crontab.in (group.owner root.mailman)
      As root execute the following commands:
      [root prompt]# cd /var/mailman/cron
      [root prompt]# crontab -u mailman crontab.in
              
      This will create/update /var/spool/cron/mailman

System Configuration:
  • Start mailman daemon: service mailman start
  • Configure Mailman to start upon system boot: chkconfig --level 345 mailman on

service manpage
chkconfig manpage

Mailman Configuration:

  1. Change defaults file mm_cfg.py
    • Fedora Core 3 / Mailman 2.1.5: /usr/lib/mailman/Mailman/mm_cfg.py
      try:
      fqdn = getfqdn()
      except:
      fqdn = 'mm_cfg_has_unknown_host_domains'

      DEFAULT_URL_HOST = fqdn
      DEFAULT_EMAIL_HOST = fqdn
    • Red Hat 9.0 / Mailman 2.1.1: /var/mailman/Mailman/mm_cfg.py
      DEFAULT_URL_HOST   = 'mega-corp.com'
      DEFAULT_EMAIL_HOST = 'mega-corp.com'
    • Red Hat 7.1 / Mailman 2.0.8: /var/mailman/Mailman/mm_cfg.py
      DEFAULT_HOST_NAME = 'localhost'
      DEFAULT_URL = 'http://localhost/mailman/'

  2. Create a mailing list (example: test):
    [root prompt]# cd /var/mailman
    [root prompt]# bin/newlist test           - Creates a mailing list called test.
                   Enter the email address of the person running the list:
                   Initial test password:    - Type it correctly. There is no verification!
              
  3. Configure sendmail: The newlist command will then print the entries to add to the file /etc/aliases.
    Add (cut and paste) the entries to the file /etc/aliases:
    • Fedora Core 3 / Mailman 2.1.5:
      test:              "|/usr/lib/mailman/mail/mailman post test"
      test-admin:        "|/usr/lib/mailman/mail/mailman admin test"
      test-bounces:      "|/usr/lib/mailman/mail/mailman bounces test"
      test-confirm:      "|/usr/lib/mailman/mail/mailman confirm test"
      test-join:         "|/usr/lib/mailman/mail/mailman join test"
      test-leave:        "|/usr/lib/mailman/mail/mailman leave test"
      test-owner:        "|/usr/lib/mailman/mail/mailman owner test"
      test-request:      "|/usr/lib/mailman/mail/mailman request test"
      test-subscribe:    "|/usr/lib/mailman/mail/mailman subscribe test"
      test-unsubscribe:  "|/usr/livarb/mailman/mail/mailman unsubscribe test"
      
    • Red Hat 9.0 / Mailman 2.1.1:
      test:              "|/var/mailman/mail/mailman post test"
      test-admin:        "|/var/mailman/mail/mailman admin test"
      test-bounces:      "|/var/mailman/mail/mailman bounces test"
      test-confirm:      "|/var/mailman/mail/mailman confirm test"
      test-join:         "|/var/mailman/mail/mailman join test"
      test-leave:        "|/var/mailman/mail/mailman leave test"
      test-owner:        "|/var/mailman/mail/mailman owner test"
      test-request:      "|/var/mailman/mail/mailman request test"
      test-subscribe:    "|/var/mailman/mail/mailman subscribe test"
      test-unsubscribe:  "|/var/mailman/mail/mailman unsubscribe test"
      
    • Red Hat 7.1 / Mailman 2.0.8:
      test:                    "|/var/mailman/mail/wrapper post test"
      test-admin:              "|/var/mailman/mail/wrapper mailowner test"
      test-request:            "|/var/mailman/mail/wrapper mailcmd test"
      test-owner:              test-admin
      
    Once the new sendmail directives have been added to the aliases file, regenerate the aliases database with the command: /usr/bin/newaliases
    Restart sendmail with the command: /etc/rc.d/init.d/sendmail restart
    The newlist command creates the directory:
    • Fedora Core 3: /usr/lib/mailman/lists/test/
    • Red Hat 7.1-9.0: /var/mailman/lists/test/
    and also creates the required files for the list.

    Potential Pitfall: If this is not set-up properly you will probably get an email stating that the list was not found.

  4. Site Password:
    • Fedora Core 3: Creat site admin password with the command /usr/lib/mailman/bin/mmsitepass (which creates the file /usr/lib/mailman/data/adm.pw) This is required or else the daemon started by the init script /etc/rc.d/init.d/mailman will not start.
    • Red Hat 9.0: Creat site admin password with the command /var/mailman/bin/mmsitepass (which creates the file /var/mailman/data/adm.pw) This is required or else the daemon started by the init script /etc/rc.d/init.d/mailman will not start.
    • Red Hat 7.1: Install notes suggested the creation of an admin password with the command /var/mailman/bin/mmsitepass (which creates the file /var/mailman/data/adm.pw) This did not seem necessary.

  5. Note mailman 2.1.1 (Red Hat 9.0, Fedora Core and later) uses a daemon, qrunner, which must be started: (as root)
    • chkconfig --level 35 mailman on
    • service mailman start

Using Mailman:

  • Point your browser to http://your-domain/mailman/admin/test/
    (or http://your-domain/mailman/admin/)
    From this administration interface, one will configure the security, policies, users and presentation of the email list.

    User should be pointed to: http://your-domain/mailman/listinfo/test
    Here users may subscribe, unsubscribe configure their account.

    User options (for their given email address) may be set by pointing the browser to: http://your-domain/mailman/options/test/email-user%40your-isp.com

    Once an email has been sent to the list, archives will be available from http://your-domain/pipermail/test/

    (Is http://localhost/mailman/private/test suppose to do something?? It didn't for me)

  • Log files are available for reviewing errors etc.: /var/mailman/logs/...

Potential Pitfalls:

  • If upgrading mailman, the command /var/mailman/bin/update will update Mailman list files. The RPM install should do this for you.
  • The easiest configuration is to run Mailman on the same computer which is running your mail server (MTA). If not, and you are sharing a filesystem, beware that the locking mechanism of NFS way thwart sucess. See: Mailman/LockFile.py and the constant CLOCK_SLOP to fix any potential problem with clock skew.

Mailman administration commands:

Mailman commands to view contents of data files:

Command Description
dumpdb List contents.
dumpdb -p /var/mailman/list-name/config.pck > outfile

Command Location:

  • Ubuntu (dapper 6.06) / Debian: /var/mailman/bin/

Transferring a Mailman repository from one server to another:

The Mailman data files are stored in the following directories:

  • Fedora Core/CentOS/Ubuntu:
    • /var/lib/mailman/lists/list-name/...
    • /var/lib/mailman/archives/private/list-name/...
      /var/lib/mailman/archives/public/list-name/...
    • /var/lib/mailman/data/...
  • Red Hat 9.0
    • /var/mailman/lists/list-name/...
    • /var/mailman/archives/private/list-name/...
      /var/mailman/archives/public/list-name/...
    • /var/mailman/data/...
Simply tar the directories and transfer them to the new server:
cd /var/lib/mailman
tar cf mailman-archive.tar lists archives data

If migrating to a newer version of Mailman, update Mailman list files to new verson by running the command:
/usr/lib/mailman/bin/update

Note:

  • When I transferred a Mailman repository from a Red Hat system to an Ubuntu system it required a soft link to maintain the CGI in the Apache CGI script alias path.
    ln -s /var/lib/mailman/cgi-bin /usr/lib/cgi-bin/mailman/
  • A new aliases file /etc/mailman/aliases and db file can be generated with the command /usr/lib/mailman/bin/genaliases
  • Directory permissions must be set to the system user id used for Mailman: (i.e. chown -R root:list)
    • Red Hat/Fedora Core: root:mailman
    • Ubuntu: root:list
    To check file permissions run the command: /usr/lib/mailman/bin/check_perms
    To fix file permissions run the command: /usr/lib/mailman/bin/check_perms -f

This worked for me.

Links: