This How-To will explain how to get mailman mailing list working with Zimbra. I have tried this on a Fedora Core 4. You may need to adjust certain things for other OSes.
This ONLY works if Zimbra's postfix is able to deliver mail locally. One thing you should note is ALL the domains added to Zimbra are by default 'virtual_mailbox_domains', so if your hostname is set to be one of the virtual mailbox domains, Mailman will NOT work for you.
Zimbra's default install sets following in /opt/zimbra/postfix/conf/main.cf
You may need to change it to get the local delivery working.
$mydestination = localhost localhost.localdomain
I shall leave it to you to figure out how to achieve that. The variations in this regard are so many that covering all possiblities is impossible and I'm not a 'Postfix Expert' by a long shot.
List names must be unique across all virtual domains. For example, you can not have email@example.com and firstname.lastname@example.org.
OK so lets get going.
First download the latest mailman sources. You can find them here.
I followed instruction on mailman documentation page.
Now, ungzip-tar, configure and install. We are going to install mailman under default location, /usr/local/mailman, user mailman and group mailman.
If you want to use Zimbra's httpd running on port 7780, you need the –with-cgi-gid option. If you have another web server running, use the group id of that web server here.
# As root
useradd -c''GNU Mailman'' -s /sbin/nologin -d /no/home -g mailman mailman
chgrp mailman mailman
chmod a+rx,g+ws mailman
Now compile and install.
# As normal user
tar xvfz mailman-2.1.7.tgz
Now setup the web server. Add following lines at the end of /opt/zimbra/conf/httpd.conf
# As root
# following is required only if you are using Zimbra's httpd
chown zimbra private
chmod o-x private
# Check your installation
Now copy mailman icons and then restart apache.
# httpd configuration settings for use with mailman.
ScriptAlias /mailman/ /usr/local/mailman/cgi-bin/
Allow from all
Alias /pipermail/ /usr/local/mailman/archives/public/
Options Indexes MultiViews FollowSymLinks
Allow from all
# Only if you have internationalized archives
# 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
Now change postfix configuration.
# As User 'zimbra'
cp /usr/local/mailman/icons/* mmimages/
Add/Modify /opt/zimbra/postfix/conf/main.cf so that following varibles are set as shown.
Add following lines at the end of /usr/local/mailman/Mailman/mm_cfg.py file.
virtual_alias_maps = ldap:/opt/zimbra/conf/ldap-vam.cf,hash:/usr/local/mailman/data/virtual-mailman
alias_maps = hash:/etc/aliases,hash:/usr/local/mailman/data/aliases
In the last variable, you need to list all your virtual mailbox domains for which you want to add mailing lists. Remember you should ONLY list your virtual domains here, not your local domain for which postfix delivers mail locally.
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/'
POSTFIX_STYLE_VIRTUAL_DOMAINS = [ 'virtual-domain1.com', 'virtual-domain2.com' ]
Now add your first list on virtual domain.
Now your should be able to visit http://<zimbra host>:7780/mailman/listinfo and browse/create new lists etc. And of course you can always use mailman's command line utilities for list maintainance.
# As root
# first add a sitewide list called mailman, this is mandatory
bin/config_list -i data/sitelist.cfg mailman
bin/newlist --emailhost=virtual-domain1.com --urlhost=<your zimbra host> <listname> <admin-email-address> <admin-password>
# This is just to make sure that aliases and virtual-mailman files get generated. Until you add a virtual-domain based list, virtual-mailman won't be generated.
# aliases and virtual-mailman must be owned by mailman.
chown mailman:mailman /usr/local/mailman/data/aliases*
chown mailman:mailman /usr/local/mailman/data/virtual-mailman*
# setup mailman cron
crontab -u mailman crontab.in
# setup daemon
cp /usr/local/mailman/scripts/mailman /etc/init.d
chkconfig --add mailman
Hope this helps.