How To Integrating Zimbra with Mailman on CentOS

This guidance will describe how to integrating Zimbra with Mailman on CentOS. This guidance refers into previous article in here : https://imanudin.net/2014/09/06/how-to-integrating-zimbra-8-5-x-with-mailman/ that use SUSE/SLES as Linux System with some adjustment and improvement.

Information System

Domain : imanudin.net
Hostname : mail.imanudin.net

# Install packages and dependencies for compile Mailman

yum install python python-devel gcc gcc-c++

# Install dnspython. This packages required for compile Mailman

cd /srv/
wget -c https://pypi.python.org/packages/source/d/dnspython/dnspython-1.12.0.zip
unzip dnspython-1.12.0.zip
cd dnspython-1.12.0
python setup.py install

# Download Mailman and extract

cd /srv/
wget -c http://ftp.gnu.org/gnu/mailman/mailman-2.1.20.tgz
tar -zxvf mailman-2.1.20.tgz
cd mailman-2.1.20

# Compile and install Mailman

groupadd mailman
useradd -c "GNU Mailman" -s /sbin/nologin -d /home/mailman -g mailman mailman
mkdir /usr/local/mailman
chgrp mailman /usr/local/mailman
chmod a+rx,g+ws /usr/local/mailman
./configure --prefix=/usr/local/mailman --with-cgi-gid=zimbra
make install
/usr/local/mailman/bin/check_perms -f
cd /usr/local/mailman/archives/
chown zimbra private
chmod o-x private
/usr/local/mailman/bin/check_perms -f

# Modify httpd.conf on Zimbra

cp /opt/zimbra/conf/httpd.conf /opt/zimbra/conf/httpd.conf.back
vi /opt/zimbra/conf/httpd.conf

add these line in the bottom

ScriptAlias /mailman/ /usr/local/mailman/cgi-bin/
<Directory /usr/local/mailman/cgi-bin/>
AllowOverride None
Options ExecCGI
Order allow,deny
Allow from all

Alias /pipermail/ /usr/local/mailman/archives/public/
<Directory /usr/local/mailman/archives/public/>
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
# Only if you have internationalized archives
AddDefaultCharset Off

# 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

Integrating Zimbra + Mailman

open mm_cfg.py file

vi /usr/local/mailman/Mailman/mm_cfg.py

adjust the configuration

MTA = 'Postfix'
POSTFIX_ALIAS_CMD = '/opt/zimbra/postfix/sbin/postalias'
POSTFIX_MAP_CMD = '/opt/zimbra/postfix/sbin/postmap'
IMAGE_LOGOS = '/mmimages/'
DEFAULT_URL_PATTERN = 'http://%s:7780/mailman/'
DEFAULT_URL_HOST = 'mail.imanudin.net'
DEFAULT_EMAIL_HOST = 'imanudin.net'

Perform the following command as root

cd /opt/zimbra/httpd/htdocs
mkdir mmimages
cp /usr/local/mailman/icons/* mmimages/
chown -R zimbra:zimbra mmimages/
su - zimbra -c "zmapachectl restart"
cd /usr/local/mailman
bin/newlist mailman adminmilist@imanudin.net
bin/mmsitepass -c list-creator-password
bin/config_list -i /usr/local/mailman/data/sitelist.cfg mailman
chown mailman:mailman /usr/local/mailman/data/aliases*
chown mailman:mailman /usr/local/mailman/data/virtual-mailman*
chmod 775 /usr/local/mailman/data/virtual-mailman.lmdb
chmod 775 /usr/local/mailman/data/aliases.lmdb

Note : Please adjust adminmilist@imanudin.net with email who action as admin. Please adjust also list-creator-password with properly password. This password will be used for create mailing list via web.

# Setup Mailman cron

cd /usr/local/mailman/cron
crontab -u mailman crontab.in

# Setup init daemon

cp /usr/local/mailman/scripts/mailman /etc/init.d/
chkconfig --add mailman
chkconfig mailman on
service mailman start

# Setup Virtual Alias

su - zimbra
zmprov ms mail.imanudin.net zimbraMtaVirtualAliasMaps 'ldap:/opt/zimbra/conf/ldap-vam.cf,lmdb:/usr/local/mailman/data/virtual-mailman'
zmprov ms mail.imanudin.net zimbraMtaAliasMaps 'lmdb:/etc/aliases,lmdb:/usr/local/mailman/data/aliases'
zmprov ms mail.imanudin.net zimbraMtaMyDestination 'localhost mail.imanudin.net'
zmcontrol restart
zmapachectl restart

# Test mailing list

Perform the following example as root

cd /usr/local/mailman
bin/newlist milist-test adminmilist@imanudin.net secret

or you can create mailing list via web browser http://IpZimbra:7780/mailman/create

Good luck and hopefully useful 😀


  1. Hi iman,
    I installed zimbra 8.7 open source edition on CentOS 7- 64 bit.
    i wish to have mailman mailing list also running on another server ( CentOS 8.7 – 64 bit)
    my structure- Zimbra on one server and mailman on another server.

    will the above guide help me ?
    may i know Is it tested with zcs 8.7 also?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.