After moving my website to Linode I had to install and configure Mailman and Postfix to manage some mailing lists and since the process is quite tricky, I decided to write down all the steps hoping it can be useful to beginners like me.
This tutorial assumes that you are using Debian 6 and the latest Mailman and Postfix stable versions and that you plan to use a dedicated subdomain for your lists.
Create the VirtualHost
Go to /etc/apache2/sites-available/ and create the file lists.mydomain.com with this content:
1 2 3 4 5 6 7 8 | |
Save the file and create the directories for public files and logs
1 2 | |
and enable the virtualhost:
1
| |
Install Mailman and postfix
For Mailman and Postifx installation I followed the tutorial Manage Email Lists with GNU Mailman on Debian 6 (Squeeze) in the Linode Library.
Be sure to complete the Configure Virtual Hosting section before creating the default mailman list.
Setup the virtualhost
Now you need to tweak your subdomain configuration in order to access the mailman web interface. You can integrate your configuration using the sample file inside /var/lib/mailman/templates/apache.conf.
Below there’s the final configuration file:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | |
To complete the configuration, add an index.html file to your subdomain root that forwards the requests to the mailman web interface
1 2 3 4 5 6 7 | |
Troubleshooting
When I completed the configuration I sent my first email to the list and got this error.
The error that the other server returned was:
550 550 5.1.1 <listname@lists.mydomain.com>:
Recipient address rejected: User unknown in local recipient table (state 14)
If you get this error probably the installation didn’t insert the corret aliases in the /etc/aliases file. To solve the problem just add this aliases to the file
mylist: "|/var/lib/mailman/mail/mailman post mylist"
mylist-admin: "|/var/lib/mailman/mail/mailman admin mylist"
mylist-bounces: "|/var/lib/mailman/mail/mailman bounces mylist"
mylist-confirm: "|/var/lib/mailman/mail/mailman confirm mylist"
mylist-join: "|/var/lib/mailman/mail/mailman join mylist"
mylist-leave: "|/var/lib/mailman/mail/mailman leave mylist"
mylist-owner: "|/var/lib/mailman/mail/mailman owner mylist"
mylist-request: "|/var/lib/mailman/mail/mailman request mylist"
mylist-subscribe: "|/var/lib/mailman/mail/mailman subscribe mylist"
mylist-unsubscribe: "|/var/lib/mailman/mail/mailman unsubscribe mylist"
and run
newaliases