Differences

This shows you the differences between two versions of the page.

Link to this comparison view

howtos:kolab:configuration:mailman [2014/08/21 12:31] (current)
dmorlock Update external wiki for Kolab 3.2
Line 1: Line 1:
 +====== 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'':​
 +<code bash>
 +echo "​MAILMAN_CGIUID=\"​nginx\""​ >> /​etc/​portage/​make.conf
 +echo "​MAILMAN_CGIGID=\"​nginx\""​ >> /​etc/​portage/​make.conf
 +</​code>​
 +  * Emerge Mailman and FCGI stuff to support Mailman'​s CGI webinterface:​
 +<code bash>
 +$ emerge mailman spawn-fcgi fcgiwrap
 +</​code>​
 +  * Edit Mailman config as follows:
 +<file python /​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'​
 +</​file>​
 +<note tip>To enable Mailman support for a new virtual domain, append you domain to ''​my_virtual_hosts''​.</​note>​
 +  * Run the following steps to properly setup Mailman:
 +<code bash>
 +$ 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
 +</​code>​
 +  * Run Mailman:
 +<code bash>
 +$ sudo rc-update add mailman default
 +$ sudo /​etc/​init.d/​mailman start
 +</​code>​
 +  * Prepend the Mailman aliases and virtual aliases to ''​alias_maps''​ and ''​virtual_alias_maps''​ in ''/​etc/​postfix/​main.cf'':​
 +<file bash /​etc/​postfix/​main.cfg>​
 +alias_maps = hash:/​var/​lib/​mailman/​data/​aliases
 +virtual_alias_maps = hash:/​var/​lib/​mailman/​data/​virtual-mailman,​ ...
 +</​file>​
 +  * Configure Nginx according to the Nginx chapter in http://​www.j-david.net/​2012/​07/​gentoo-mailman-with-nginx-exim.html.