Adding Mailman Virtual Hosts
Adding Mailman Virtual Hosts version 0.9
(c)07-22-08 Thom LaCosta
A Mailman installation can provide mailing list service for all domains on
a server. At this time, the system administrator must perform certain
functions. Once these functions are accomplished, either the Systems
Administrator or the Site Administrator can finish the installation.
Mailman can be installed via the steps posted at
http://directadmin.com/forum/showthread.php?t=25596&highlight=mailman
A. Add mailman virtual host
At this time, only the system administrator can perform this function
Log in via SSH as admin or root
cd /usr/local/mailman/Mailman
Edit the file mm_cfg.py
At the end of the file, add the virtual host after these lines
#################################################
# Put YOUR site-specific settings below this line.
add_virtualhost( 'mailman.the_domain.you_add' )
restart mailman
service mailman restart
B. Add DNS Entry
This step must be performed by the System Administrator unless the Site
Administrator had been given access to DNS Management. Add two
entries via DNS Management as follows:
www.mailman A the_ip_that_the_domain_uses
mailman A the_ip_that_the_domain_uses
C. Add virtual Host Container to /etc/httpd/conf/httpd.conf
Sample
<VirtualHost 12.180.200.76:80>
ServerName
www.mailman.virtual_domain
ServerAlias
www.mailman.virtual_domain virtual.domain
ServerAdmin
[email protected]
DocumentRoot /usr/local/mailman
ScriptAlias /mailman/ /usr/local/mailman/cgi-bin/
UseCanonicalName OFF
User mailman
Group mailman
CustomLog /var/log/httpd/domains/mailman.virtual_domain.bytes bytes
CustomLog /var/log/httpd/domains/mailman.virtual_domain.log combined
ErrorLog /var/log/httpd/domains/mailman.virtual_domain.error.log
<Directory /usr/local/mailman/cgi-bin/>
AllowOverride All
Options ExecCGI
Order allow,deny
Allow from all
</Directory>
Alias /pipermail/ /usr/local/mailman/archives/public/
<Directory /usr/local/mailman/archives/public>
Options Indexes MultiViews FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
Restart Apache
service httpd restart
D. Add aliases
Each new Mailman list requires aliases to be entered in /etc/aliases
Mailman will send a message to the list owner with the aliases to add
There are two ways to add the aliases for Mailman. One is to add them
via the control panel as forwarders. The other method is to simply add
the aliases via an ssh session and restart Exim when finished
service exim restart
Sample Alias File for list named new-list
new-list: "|/usr/local/mailman/mail/mailman post new-list"
new-list-admin: "|/usr/local/mailman/mail/mailman admin new-list"
new-list-bounces: "|/usr/local/mailman/mail/mailman bounces new-list"
new-list-confirm: "|/usr/local/mailman/mail/mailman confirm new-list"
new-list-join: "|/usr/local/mailman/mail/mailman join new-list"
new-list-leave: "|/usr/local/mailman/mail/mailman leave new-list"
new-list-owner: "|/usr/local/mailman/mail/mailman owner new-list"
new-list-request: "|/usr/local/mailman/mail/mailman request new-list"
new-list-subscribe: "|/usr/local/mailman/mail/mailman subscribe new-list"
new-list-unsubscribe: "|/usr/local/mailman/mail/mailman unsubscribe new-list"
service exim restart
E. Creating List
The new list can be created via the web once the virtual host information
propagates.
One would browse to
www.mailman.the_ip_that_the_domain_uses/mailman/admin
select create a list and at
www.mailman.the_ip_that_the_domain_uses/mailman/create
create the list new-list, use the email of the list owner and select send
notification to list owner
The list may be created prior to propagation via ssh. If you're logged in
as root and create the lists,
cd /usr/local/mailman/lists/name_of_the_new_list and change ownership
and group of the files to mailman
chown mailman:mailman
Another method would be to su to mailman ( su mailman ), change to the
mailman directory cd /usr/local/mailman and issue the command bin/newlist