Mailman

This enables Mailman for the Postfix/Kolab setup. The following is partly based on http://www.j-david.net/2012/07/gentoo-mailman-with-nginx-exim.html.

  • Set mailman user to nginx:
echo "MAILMAN_CGIUID=\"nginx\"" >> /etc/portage/make.conf
echo "MAILMAN_CGIGID=\"nginx\"" >> /etc/portage/make.conf
  • Emerge Mailman and FCGI stuff to support Mailman's CGI webinterface:
$ emerge mailman spawn-fcgi fcgiwrap
  • Edit Mailman config as follows:
/etc/mailman/mm_cfg.py
# ...
# Put YOUR site-specific settings below this line.
DEFAULT_URL_HOST = 'lists.awesome-mail.de'
DEFAULT_EMAIL_HOST = 'awesome-mail.de'
 
# Let Mailman know that the MTA (Exim) needs no aliases setting
MTA = 'Postfix'
 
# Add your virtual hosts here
my_virtual_hosts = ["awesome-mail.de", "volleyball-remchingen.de", "morlock.me"]
 
# Don't edit anything below!
VIRTUAL_HOSTS.clear()
POSTFIX_STYLE_VIRTUAL_DOMAINS = []
add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST)
 
for vhost in my_virtual_hosts:
    add_virtualhost("lists.%s" % vhost, vhost)
    POSTFIX_STYLE_VIRTUAL_DOMAINS.append(vhost)
 
VIRTUAL_MAILMAN_LOCAL_DOMAIN = 'awesome-mail.de'

To enable Mailman support for a new virtual domain, append you domain to my_virtual_hosts.

  • Run the following steps to properly setup Mailman:
$ sudo su - mailman
 
# Add the cron jobs
mailman $ crontab cron/crontab.in 
 
# Create the site password
mailman $ bin/mmsitepass
 
# Add main list
mailman $ bin/newlist mailman
  • Run Mailman:
$ sudo rc-update add mailman default
$ sudo /etc/init.d/mailman start
  • Prepend the Mailman aliases and virtual aliases to alias_maps and virtual_alias_maps in /etc/postfix/main.cf:
/etc/postfix/main.cfg
alias_maps = hash:/var/lib/mailman/data/aliases
virtual_alias_maps = hash:/var/lib/mailman/data/virtual-mailman, ...