How To Integrating Zimbra with Mailman on CentOS

Posted by

This guidance will describe how to integrating Zimbra with Mailman on CentOS. This guidance refers into previous article in here : that use SUSE/SLES as Linux System with some adjustment and improvement.

Information System

Domain :
Hostname :

# 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
cd dnspython-1.12.0
python install

# Download Mailman and extract

cd /srv/
wget -c
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 with your server's
# name, to redirect queries to /mailman to the listinfo page (recommended).
# RedirectMatch ^/mailman[/]*$

Integrating Zimbra + Mailman

open file

vi /usr/local/mailman/Mailman/

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/'

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

# 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 zimbraMtaVirtualAliasMaps 'ldap:/opt/zimbra/conf/,lmdb:/usr/local/mailman/data/virtual-mailman'
zmprov ms zimbraMtaAliasMaps 'lmdb:/etc/aliases,lmdb:/usr/local/mailman/data/aliases'
zmprov ms zimbraMtaMyDestination 'localhost'
zmcontrol restart
zmapachectl restart

# Test mailing list

Perform the following example as root

cd /usr/local/mailman
bin/newlist milist-test 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.