Configure options : change the group and user used by apache to nobody.
EXTRA_ECONF=”–with-cgi-gid=nobody –with-cgi-uid=nobody –with-mail-gid=vchkpw” emerge -a mailman
Create a subdomain and edit the vhost in /etc/httpd/httpd.conf :
ServerAdmin webmaster@domain.com
DocumentRoot /home/domain/sd/mailman/www
ServerName mailman.domain.com
CustomLog logs/mailman.domain.com-access_log combined
ScriptAlias /mailman /usr/lib/mailman/cgi-bin/
AddHandler x-httpd-php5 .php
Add the MAILMAN option to $APACHE2_OPTS in /etc/conf.d/apache
Copy mailman icon images to your vhost www :
cp -R /usr/lib/mailman/icons/ /home/domain/sd/mmm/www/
mv /home/domain/sd/mmm/www/icons /home/domain/sd/mmm/www/mailman-icons
Add the vhost domain to mailman config file mm_cfg.py :
add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST)
In /etc/group make sure the user mailman is part of the cron group :
cron:x:16:mailman
Add the cron jobs :
su – mailman
cd /usr/lib/mailman/cron
crontab crontab.in
cd ..
Create password and main list :
bin/mmsitepass
bin/newlist mailman
Check and repair mailman permissions :
/usr/lib/mailman/bin/check_perms -f
Start the mailman daemon :
/etc/init.d/mailman start
Add to default runlevel :
rc-update add mailman default
Add the subdomain to bind :
subdomain1 IN A IPv4
subdomain1 IN MX 10 mail.domain.com.
restart bind /etc/init.d/named restart
Go to /home/vpopmail/domains/
Use the vpopmail tools to create your mailman subdomain :
/home/vpopmail/bin/vadddomain mailman.domain.com
This will add the subdomain to qmail files like /var/qmail/control/rcpthosts
We can create aliases manually or use the qmail-to-mailman.py.
To make it work with each virtualhost, we need to tune it for each virtualhost.
We can have a qmail-to-mailman script for each virtualhost.
mkdir /home/virtualhost/sd/subdomain/bin
cp /usr/lib/mailman/bin/qmail-to-mailman.py /home/virtualhost/sd/subdomain/bin
chown -R mailman:mailman /home/virtualhost/sd/subdomain/bin
edit qmail-to-mailman.py and check if the paths and list admin email are ok.
edit this line :
local = re.sub(”^mailman-”,”",local)
and replace mailman by your subdomain.vhostdomain. (if mailman is the subdomain and vhostdomain.com is your domain) :
local = re.sub(”^mailman.vhostdomain.com-”,”",local)
Edit .qmail-default and put this in to hook up qmail with mailman via qmail-to-mailman.py :
|/var/qmail/bin/preline /home/domain/sd/subdomain/bin/qmail-to-mailman.py
Go to : http://mailman.mydomain.com/mailman/admin
It should work !
