User Guide - Mailman
- 31/03/2009 3:23 PM
Applicable Plans - All eApps General VPS plans
User Guide - Mailman mailing list manager
Mailman is a mailing list manager distributed by the GNU project. It has an easy to use web interface that allows users to easily subscribe or unsubscribe from a mailing list, and to also manage their subscriptions.The main site for Mailman with links to all the documentation is here – http://www.gnu.org/software/mailman/index.html and the Wikipedia page is here – http://en.wikipedia.org/wiki/GNU_Mailman.
Overview
eApps offers both Mailman and Majordomo mailing list managers. Either will work for a basic mailing list, and if you are more comfortable with Majordomo, you should consider using it instead of Mailman. One main difference between Mailman and Majordomo is that with Mailman, the list subscribers can control their subscription options from a web interface, allowing them to subscribe/unsubscribe and change their delivery options. Mailman is also much newer software and is still updated on a regular basis, unlike Majordomo which has not been updated since 2000.In this User Guide, the domain of example.com is used as a placeholder domain. Please substitute your actual domain name where necessary |
Installing Mailman
Creating a Mailing List
Adding users to a list
Other Useful Commands
Changing the URL for a mailing list
Links to other information
Installing Mailman
Login to your Control Panel, and click on the System Tab. If necessary, click the Select Another System (Subscription) link on the left and choose the correct system.If you are not sure if Mailman is installed, go to Applications, and click on All Applications. If you see Mailman in the list, then the application is installed, and you can skip the next steps. If you do not see Mailman in the list, please continue with the next steps.
Go to Applications, and click on the Add Application link. Select the box next to Mailman, and then scroll down and click the Next button.
This takes you back to the All Applications screen. Wait for five minutes, then click on the Refresh link at the upper right, just under the word Parallels. The application should now show as installed. If it is still in a Scheduled state, wait another five minutes, and click Refresh again. If you see it in Error state, or it still shows as Scheduled, please contact eApps Technical Support.
On CentOS 4, you could have Mailman OR Majordomo installed, but not both. On CentOS 5 you can have both installed. |
Once Mailman is installed, you can access the application either by clicking on the Mailman application icon in the Applications section of the Control Panel, or by clicking on All Applications and clicking on the application link located there. With either method, there will be a Control Panel URL that will go to http://example.com/mailman/listinfo (where example.com is the name of the VPS on the System Tab). This will show all the Mailman mailing lists on the VPS. There is a Mailman list created when the application is installed, which should be left in place.
From that URL you can click on the list admin overview page link, which takes you to http://example.com/mailman/admin. This is where any mailing lists for this VPS can be administered. Click on the name of a list, and enter the password, which is shown in the Control Panel, System Tab, All Applications - Mailman. The password is on the line that says "Installed RPM packages". This takes you to http://example.com/mailman/admin/listname where all the configuration options for Mailman are set.
Creating a Mailing List
On the list admin overview page at http://example.com/mailman/admin, there is a link to create a new mailing list which takes you to the page at http://example.com/mailman/create where you can create a new list, set the administrator’s e-mail address and password, set the language, and a few other options.However, this does not actually work - Mailman will allow you to enter all the values, and will appear to create the list, but in reality won’t actually do anything, and it generates no errors or any other indication that the list wasn’t really created. There will be a link to the list in the web interface, and options to configure the list and add users, but no list actually exists. Note that this isn’t a problem with the Mailman software, but a problem with the Parallels Control Panel not allowing the Mailman application to write to certain system files.
To actually create a mailing list, you have to login to the VPS using SSH as the root user, and create the list manually. Once the list is created, it can be managed through the web interface, but the actual creation has to be done from the command line.
Creating a mailing list – step by step instructions
All of the command line examples in this User Guide must be done while logged in via SSH as the root user. See the SSH User Guide for more information if necessary. The ability to use standard Linux commands and edit files using the vi text editor is required. |
The configuration files for Mailman are located here: /usr/lib/mailman/bin
(there are also files in /etc/mailman and /var/lib/mailman, but they are not used for the list configuration and management)
[root@example]# cd /usr/lib/mailman/bin [root@example bin]# ./newlist Enter the name of the list: listname Enter the email of the person running the list: user@example.com Initial listname password: passwd To finish creating your mailing list, you must edit your /etc/aliases (or equivalent) file by adding the following lines, and possibly running the `newaliases' program: ## listname mailing list listname: "|/usr/lib/mailman/mail/mailman post listname" listname-admin: "|/usr/lib/mailman/mail/mailman admin listname" listname-bounces: "|/usr/lib/mailman/mail/mailman bounces listname" listname-confirm: "|/usr/lib/mailman/mail/mailman confirm listname" listname-join: "|/usr/lib/mailman/mail/mailman join listname" listname-leave: "|/usr/lib/mailman/mail/mailman leave listname" listname-owner: "|/usr/lib/mailman/mail/mailman owner listname" listname-request: "|/usr/lib/mailman/mail/mailman request listname" listname-subscribe: "|/usr/lib/mailman/mail/mailman subscribe listname" listname-unsubscribe: "|/usr/lib/mailman/mail/mailman unsubscribe listname" Hit enter to notify listname owner... [root@example bin]# |
Copy the aliases generated by the newlist command, starting at the ## listname mailing list line.
[root@example bin]# cd /etc/ [root@example etc]# vi aliases |
Paste the mailing list aliases at the bottom of the aliases file, save and exit the file. Then run the newaliases command so that sendmail knows about the new mailing list.
[root@example etc]# newaliases /etc/aliases: 123 aliases, longest 140 bytes, 4031 bytes total [root@example etc]# service sendmail restart Shutting down sendmail: [ OK ] Shutting down sm-client: [ OK ] Starting sendmail: [ OK ] Starting sm-client: [ OK ] (If you receive the error sendmail: unrecognized service, then do the following) [root@example etc]# service xinetd restart Stopping xinetd: [ OK ] Starting xinetd: [ OK ] [root@example etc]# cd /usr/lib/mailman/bin [root@example bin]# ./mailmanctl restart Restarting Mailman's master qrunner [root@example bin]# |
This creates the mailing list, sets the password, and sends an e-mail to the list owner letting them know the list was created. This also puts the link for the mailing list in the Mailman web interface. Now the mailing list can be managed from http://example.com/mailman/admin/listname
Adding users to a list
With Mailman, the standard way a user is added to a list is by the user subscribing themselves to the list from the Info page for that list, located at http://example.com/mailman/listinfo/listname. This page allows the user to subscribe to the list or change their membership options if they are already subscribed. This is also the page that can be publicly advertised for the mailing list.However, this method does not work if a lot of users have to be added at once to the list. If users need to be added to the list manually, there are three options. One option is to use the add_members command from the command line, and the other two are available from the Administration web interface for the list.
Using add_members
To add users from the command line, use the add_members command. This command allows you to specify a plain text file with one e-mail address per line. There are several options for add_members, which can be seen with add_members -h, but the most common usage is the following../add_members -r filename.txt listname
This adds the members from a file called filename.txt to the mailing list listname, and if the list options are set to send a Welcome message, one will be sent to each member.
Using the Mailman web interface
The other two options are available from the listname Administration page for the list located at http://example.com/mailman/admin/listname/. Click on the Membership Management link, and then on Mass Subscription. Here you can either enter one address at a time in the box provided, or upload a file from your local computer. This file must also be plain text, with one e-mail address per line. Once you have entered the e-mail addresses or uploaded the file, click the Submit Your Changes button to add the users to the list.Other Useful Commands
Here are some other commands that are useful to troubleshoot or configure Mailman. All of these commands are located in /usr/lib/mailman/bin and are to be run from the command line as the root user. Generally, all the commands are fairly self-explanatory. The official Mailman Documentation site also has an explanation of the commands and what they do – http://www.gnu.org/software/mailman/site.htmlFor all the commands, you can use ./command -h for help on the command syntax.
./genaliases – this displays the list of all the aliases for every mailing list configured in Mailman. This is useful if you need to check to see if a list was correctly added to /etc/aliases
./list_lists – this displays all the lists configured in Mailman
./mmsitepass – this changes the default password for the Mailman admin page. This password over rides the individual mailing list passwords.
./change_pw – this changes the password for a specific mailing list. The syntax of the command is as follows: ./change_pw -l listname -p newpassword
./rmlist listname – this removes all traces of a mailing list. This is used when a mailing list was first created using the web interface, because the newlist command will not create the list if the list name already exists in Mailman’s database of lists.
./mailmanctl start|stop|restart|status – this command controls the Mailman queue runner processes, which controls Mailman.
Changing the URL for a mailing list
By default, the URL for all the mailing lists will be the hostname of the VPS, found on the System Tab. There is a way to change that, so that the name of the list reflects the actual domain name for that list. For example, if the hostname of the VPS is example.com, then all the lists will be listname@example.com. This might be confusing for some users who are expecting to see listname@domain.com in the mailing list address and the URL. Here is how to change the list URL to use a different domain other than the hostname of the VPS. This command is run from the /usr/lib/mailman/bin directory.[root@example bin]# ./withlist -l -r fix_url listname --urlhost=domain.com -v Importing fix_url... Running fix_url.fix_url()... Loading list listname (locked) Setting web_page_url to: http://domain.com/mailman/ Setting host_name to: domain.com Saving list Finalizing [root@example bin]# |
This sets the URL for the mailing list to http://www.domain.com/mailman/listinfo/listname, and all the e-mail will now come from listname@domain.com.
Links to other information
Mailman-Users mailing list and archives - http://mail.python.org/mailman/listinfo/mailman-usersMailman Community Wiki - http://wiki.list.org/display/COM/Home
Mailman FAQ - http://wiki.list.org/display/DOC/Frequently+Asked+Questions
Comments
Powered by WHMCompleteSolution