From Notes Wiki
Jump to: navigation, search
Home > CentOS > CentOS 6.x > Mailman server configuration > Basic mailman server configuration with postfix

Basic mailman server configuration with postfix

One can setup a local mailman server to support mailing lists using following steps:

  1. Install mailman using 'yum -y install mailman'
  2. Install and configure apache as desired. For example for HTTPS install mod_ssl and edit '/etc/httpd/conf.d/ssl.conf' appropriately.
  3. Edit '/etc/httpd/conf.d/mailman.conf' and uncomment "RedirectMatch ^/mailman[/]*$ /mailman/listinfo"
  4. Restart apache using 'service httpd restart'
  5. Enable apache to run on start-up using 'chkconfig httpd on'
  6. Set site wide admin password using '/usr/lib/mailman/bin/mmsitepass <password>'
  7. Configure mailman by editing '/etc/mailman/mm_cfg.py' as follows:
    1. Modify 'DEFAULT_URL_HOST' and set its value to " '<lists-server-fqdn>' " (enclosed in single quotes). For example lists.example.com.
    2. Modify 'DEFAULT_EMAIL_HOST' and set its value to " '<email-domain>' " (enclosed in single quotes). For example example.com.
    3. Append "MTA = 'Postfix' "
    Note that site specific config file is at "/usr/lib/mailman/Mailman/mm_cfg.py" and installation defaults are mentioned in "/usr/lib/mailman/Mailman/Defaults.py".
  8. Create mailman mailing list. This is absolutely necessary.
    /usr/lib/mailman/bin/newlist mailman
    Enter list admin email and list password as desired.
  9. Create test mailing list.
    /usr/lib/mailman/bin/newlist test
  10. Configure postfix by editing '/etc/postfix/main.cf' as follows:
    1. Append
      myhostname = <lists-server-fqdn>
      mydomain = <lists-server-fqdn>
      myorigin = $mydomain
      local_recipient_maps =
      append "recipient_delimiter = +"
    2. Replace
      inet_interfaces = all
      alias_maps = hash:/etc/aliases,hash:/etc/mailman/aliases
      (Do not add value to alias_database)
    and restart postfix
  11. Set proper permissions by running check_perms twice
    /usr/lib/mailman/bin/check_perms -f
    /usr/lib/mailman/bin/check_perms -f
  12. Start mailman service and enable on startup using:
    service mailman start
    chkconfig mailmain on
  13. Add members to test list using
    echo 'user1@example.com' > members.txt
    echo 'user2@example.com' > members.txt
    echo 'user3@example.com' > members.txt
    /usr/lib/mailman/bin/sync_members -f members.txt test
    /usr/lib/mailman/bin/list_members test

Access mailman web interface at http://<lists-server-fqdn>/mailman/

Public list archives are available at http://<lists-server-fqdn>/pipermail/


Converting list to private

To convert mailing list to private use following steps:

  1. Create a text file with line 'archive_private = 1'
  2. Run "/usr/lib/mailman/bin/config_list -i <text-file-path> <list-name>"


Most steps learned from http://www.yolinux.com/TUTORIALS/LinuxTutorialMailman.html Learn more mailman command line admin tools from http://www.gnu.org/software/mailman/site.html


Home > CentOS > CentOS 6.x > Mailman server configuration > Basic mailman server configuration with postfix