Tag Archives: mailman virtualhosting linux sendmail

Virtual Hosting with Mailman

This document is useful if:
1) Need to provide mailman to multiple domains
2) domain wants to have their customized mailman
3) list of one domain conflicts with another…

Steps:

This doc assumes that mailman is already running on the server and that this doc is only for configuring mailman for multiple domains.

Installing Mailman for domain lists.mydomain.com

1) mkdir /www/lists.mydomain.com ( where mailman would be installed for the additional domain)
2) chown -R mailman.mailman /www/lists.mydomain.com
3) chmod 02755 /www/lists.mydomain.com
4) Untar the mailman package.
5) Run: ./configure –prefix=/www/lists.mydomain.com –with-username=mailman –with-groupname=mailman –with-cgi-gid=1063 –with-mail-gid=47
where 1063 is gid of the user under which the cgis run, and 47 the uid of mail/sendmail/smmsp
6) If you had installed sendmail from source, you would now need to make a symlink to the mailman wrapper binary
a. cd /www/lists.mydomain.com/mail/
b. ln -s wrapper wrapper2
c. cd /usr/adm/sm.bin ( or the dir where the symlink for smrsh to work properly are, which you had already configured for the initial mailman installation)
d. ln -s /www/lists.mydomain.com/mail/wrapper2 ./wrapper2
7) chmod -R 755 /www/lists.mydomain.com/cgi-bin
8) chown -R mailman.mailman /www/lists.mydomain.com

Creating a list and configuring sendmail

Configuring Mailman for Virtualhosting for lists.mydomain.com

1) su – mailman
2) cd /www/lists.mydomain.com/bin
3) ./newlist ( for example, news)
4) this will give the output like:
news: “|/www/lists.mydomain.com/mail/wrapper post news”
news-admin: “|/www/lists.mydomain.com/mail/wrapper mailowner news”
news-request: “|/www/lists.mydomain.com/mail/wrapper mailcmd news”
news-owner: news-admin

Copy the text ( DO NOT ADD THIS to /etc/mail/aliases yet)

5) Edit the text to:
mydomain_news: “|/www/lists.mydomain.com/mail/wrapper2 post news”
mydomain_news-admin: “|/www/lists.mydomain.com/mail/wrapper2 mailowner news”
mydomain_news-request: “|/www/lists.mydomain.com/mail/wrapper2 mailcmd news”
mydomain_news-owner: mydomain_news-admin

and as root, add to /etc/mail/aliases

6) Then, edit /etc/mail/virtusertable ( as root),and add the follwing:
news@lists.mydomain.com mydomain_news
news-admin@lists.mydomain.com mydomain_news-admin
news-request@lists.mydomain.com mydomain_news-request
news-owner@lists.mydomain.com mydomain_news-owner

7) as root, run /etc/rc.d/init.d/sendmail restart

List “news” is now created for lists.mydomain.com.