How to install and configure GNU Mailman on Centos 6.2


GNU Mailman allows you to setup, administer and maintain email lists. This article shows how to get it setup on Centos 6.2

References

 

Purpose:

We are using the 'iDoneThis' service to help our daily standup meetings to be more effective. Seeing as it is effectively a polished email list i set about to simulate the behavior using GNU Mailman. (In the end we stuck with iDoneThis since it worked better for our non-engineer staff)

 

How to install (Assumes Centos 6.2+)

  • yum install mailman
  • yum install postfix
  • yum install httpd
 

Configure Centos for Mailman

  • Configure postfix / MTA to allow for sending and retrieval of email
  • Ensure iptables has rules that allow traffic over port 80 (web ui) and allows email traffic
  • Run the following comands to ensure that mailman + dependencies start when the server boots:
    • chkconfig --level 2345 mailman on
    • chkconfig --level 2345 httpd on
    • chkconfig --level 2345 postfix on   (Or other MTA if you use one)
       
  • service mailman start  (to start the Mailman server now)
 

How to configure the GNU Mailman system

    • Edit the /etc/mailman/mm_cfg.py file
      • Set DEFAULT_URL_HOST to the FQDN used to hit the box over http
      • Set DEFAULT_EMAIL_HOST to the domain name where people can send email to
         
    • Edit /etc/httpd/conf.d/mailman.conf
      • Uncomment the last line so it looks something like this:
          •  RedirectMatch ^/mailman[/]*$ /mailman/listinfo



          This ensures that you and your email list users can access the web configuration portal 
  • Set the Mailman admin password:
    •  /usr/lib/mailman/bin/mmsitepass password
       
  • You can check for updates to Mailman by running this command:
    • /usr/lib/mailman/bin/update
      If no updates are available you will see a message indicating No updates are necessary
    •  

  • Run the check_perms command to ensure that permissions are correct
    • /usr/lib/mailman/bin/check_perms
    • If problems are found run check_perms -f
       
  • Import the crontab settings. Warning: This may overwrite all your crontab entries. take a backup first!
    • cd /usr/lib/mailman/cron
    • crontab crontab.in
       
  • You can configure the crontab to set when digests and other messages get sent
    • crontab -e
    • Edit the appropriate mailman lines (crontab entries are well documented)
       

 

 

Create a new Email List

  • From the command line run:
    • /usr/lib/mailman/bin/newlist ListNamehere
    • Follow the prompts
    • Follow the instructions to copy lines to /etc/aliases then run the newaliases command. Your Mailman list will not work without these settings!
       
  • Login via web browser to http://fqdn/mailman and login as an administrator to add people to the list, approve posts, etc...

 

Errata

  • If you are not using a package manager to install Mailman, watch out for the Apache user's GID. Be sure to compile Mailman with awareness of the proper GID (see this page for details)

  • I wasn't able to figure out how to 'whitelist' a user (I only spent an hour on the whole setup) 

  • Looks like there may be a way to 'spice up' mailman by using HTML emails and Digests. Maybe I'll try it out if we get tired of paying for spiffy emails: