Here is how to install the mailman mailing list on CentOS 6.6.
Install Mailman via yum:


# yum install mailman

Next, edit its Apache configuration file:

# cd /etc/httpd/conf.d
# vi mailman.conf
RedirectMatch ^/mailman[/]*$ http://domain.com/mailman/listinfo

Uncomment the redirect parameter and enter the correct domain name.
Set the site master password:

# /usr/lib/mailman/bin/mmsitepass password

This password can be used to access any list or any page. Edit the Mailman configuration file:


# vi /usr/lib/mailman/Mailman/mm_cfg.py
DEFAULT_URL_HOST = ‘domain.com’
DEFAULT_EMAIL_HOST = ‘domain.com’

The URL host parameter usually matches the domain name from the above Apache configuration file. The email host should match the origin of the mail (i.e. the part after the @ of the email address, whether it is host.domain.com or domain.com).
Check for updates:


# cd /usr/lib/mailman
# bin/update
Upgrading from version 0x0 to 0x2010cf0
getting rid of old source files
no lists == nothing to do, exiting


If you get this error:

# bin/update
Traceback (most recent call last):
  File "bin/update", line 48, in <module>
    from Mailman import mm_cfg
  File "/usr/lib/mailman/Mailman/mm_cfg.py", line 86, in <module>
    DEFAULT_URL_HOST   = coldriverdata.com
NameError: name 'coldriverdata' is not defined

Check that the format is correct with the domains

# vi /usr/lib/mailman/Mailman/mm_cfg.py
DEFAULT_URL_HOST = ‘domain.com’
DEFAULT_EMAIL_HOST = ‘domain.com’

* Notice the “‘”

Create the mailman site list and set up the aliases:


> cd /usr/lib/mailman
> bin/newlist mailman


Enter the email of the person running the list: minh@minhtech.com
Initial mailman password: password
To finish creating your mailing list, you must edit your /etc/aliases (or
equivalent) file by adding the following lines, and possibly running the
`newaliases’ program:

## 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”

Hit enter to notify mailman owner…


> vi /etc/aliases
## 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”


# newaliases

After creating the list, add the listed aliases to the bottom of the aliases file, and then run newaliases.
Finally, restart Apache and start mailman:


# /etc/init.d/httpd restart
Stopping httpd: [ OK ]
Starting httpd: [ OK ]

# /etc/init.d/mailman start
Starting mailman: [ OK ]


# chkconfig –level 2345 mailman on