Configuring Mailman on Ubuntu with Postfix
Mailman is one of the most flexible mail list software packages but can be difficult to set up. This article looks at one of the simpler configurations on Ubuntu 8.10 using Postfix and the Apache web server. It assumes that there are two domains, default.web and virtual.web (to be replaced throughout with the actual domain names). Furthermore, these domains have the subdomains www, mail and lists where the last subdomain is used to separate mail for the mailing lists from other mail processed by the server. It is also assumed that Postfix and Apache are already installed on the server and are working correctly.
Mailman
Start by installing Mailman.
apt-get install mailman
Running the script to check the permissions.
check_perms
This seems to indicate that some of the files have the wrong permissions. To fix them run the script with the -f flag.
check_perms -f
This should be run twice. There may still be some errors reported. This is because there are some symbolic links and the script checks the permissions for the link instead of the permissions of the target.
Change to the /etc/mailman directory. Here there is a script postfix-to-mailman.py
which we will use to make the configuration simpler and avoid the need to create aliases. Inside the script are instructions upon which these instructions are based.
Check to make sure there is a link from /var/lib/mailman/bin/postfix-to-mailman.py to /etc/mailman/postfix-to-mailman.py.
Edit the following parameters in /etc/mailman/mm_cfg.py and if they do not already exist, add them to the file.
MTA=None # No MTA processing req’d for Ubuntu/virtual/postfix-to-mailman.py
DEFAULT_URL_PATTERN = ‘http://%s/mailman/’
PRIVATE_ARCHIVE_URL = ‘/cgi-bin/mailman/private’
IMAGE_LOGOS = ‘/images/mailman/’
DEFAULT_EMAIL_HOST = ‘lists.default.web’
DEFAULT_URL_HOST = ‘lists.default.web’
DEB_LISTMASTER = ‘listmaster@default.web’
add_virtualhost(‘lists.virtual.web’, ‘lists.virtual.web’)
add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST)
listmaster@default.web should be replaced with an actual email address. If there
are additional virtual domains they can be similarly listed.
Apache
The URL pattern used above requires editing the file /etc/mailman/apache.conf and uncommenting the following line.
ScriptAlias /mailman/ /usr/lib/cgi-bin/mailman/
Create a link to point to the file we just edited.
ln -s ../../mailman/apache.conf /etc/apache2/sites-available/mailman
That is all that is required. Now enable the site.
a2ensite mailman
The reload the Apache server so it picks up the new site.
/etc/init.d/apache2 reload
Postfix
Now it is time to configure Postfix for Mailman. Create the file /etc/postfix/transport.
lists.default.web mailman:
lists.virtual.web mailman:
Note that this is telling Postfix to send any mail to the lists subdomains to Mailman to be processed.
The postmap command is used to generate transport.db
postmap transport
Now edit the /etc/postfix/master.cf file. The following line should appear but may need to be edited.
mailman unix – n n – – pipe
flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
${nexthop} ${mailbox}
Make sure there are two “n”s as older versions only have one. Edit /etc/postfix/main.cf.
relay_domains = lists.default.web, lists.virtual.web
transport_maps = hash:/etc/postfix/transport
mailman_destination_recipient_limit = 1
Reload Postfix to pick up the changes.
/etc/init.d/postfix reload
Mailing lists
Before we can start Mailman we need to set up the mailman list which is used for sending out administrative mail for Mailman. Mailman will refuse to start until this step is completed.
newlist mailman
Enter an email address and password for the administrator of this administrative mailing list. To configure this list run the script
config_list -i /var/lib/mailman/data/sitelist.cfg mailman
This should not be used for other mailing lists as it may not have appropriate settings for them.
In addition to a site-wide mailing list there is a site password which should be set.
mmsitepass
While a site password can be used to create mailing lists you may also want to create an optional list creator password to give to people instead of the site password.
mmsitepassword -c
Now we are ready to start Mailman.
/etc/init.d/mailman start
Mailman, Apache and Postfix should now all be working.
Additional matters
Before ending these instructions some additional information. There are Mailman scripts used for administrative purposes which are covered at http://www.gnu.org/software/mailman/site.html.
To create a new mailing list, go to http://lists.default.web/mailman/create or http://lists.virtual.web/mailman/create depending on which domain you wish the list to use.
Posted: March 20th, 2009 under Uncategorized.
Tags: Server Administration
Trackback from JORDAN
Time September 8, 2010 at 7:52 am
Buy:Lumigan.Nexium.100% Pure Okinawan Coral Calcium.Petcam (Metacam) Oral Suspension.Retin-A.Human Growth Hormone.Mega Hoodia.Prevacid.Zovirax.Zyban.Synthroid.Actos.Accutane.Arimidex.Valtrex.Prednisolone….