The content of {{ic|/etc/mailman/mm_cfg.py}} varies depending on the chosen mail server.

The content of {{ic|/etc/mailman/mm_cfg.py}} varies depending on the chosen mail server.

−

The full set of configuration defaults lives in the {ic|/usr/lib/mailman/Mailman/Defaults.py}} file, however you should never modify this file! Instead, change the '''mm_cfg.py''' file; you only need to add values to mm_cfg.py that are different than the defaults in Defaults.py. (Future Mailman upgrades are guaranteed never to touch your mm_cfg.py file.)

+

The full set of configuration defaults lives in the {{ic|/usr/lib/mailman/Mailman/Defaults.py}} file, however you should never modify this file! Instead, change the '''mm_cfg.py''' file; you only need to add values to mm_cfg.py that are different than the defaults in Defaults.py. (Future Mailman upgrades are guaranteed never to touch your mm_cfg.py file.)

=== Web Server integration ===

=== Web Server integration ===

Revision as of 12:33, 26 June 2013

Mailman is an application for managing electronic mailing lists. Normally you will use it along a mail server and also a web server too; for the first you may pick one between Postfix, Exim, Sendmail and Qmail —if you are unsure about which one to use, Postfix is a very good choice—; as for the latter, any web server is useful, common options are Apache, Lighttpd and Nginx. (These three pieces not necessarily shall run on the same computer.)

Only the Mailman installation will be covered in this article. You can refer to the correspondent wiki pages to learn how to install the mail and web servers.

For this guide we are going to suppose that you are using a machine called "arch" and you want to setup mailing lists for the organizations "a", "b" and "c", with example domains "a.org", "b.org" and "c.org" that point to "arch". For each domain,

Mailman's web interface will be accessible from lists.[organization_name].org and

the lists' archives under lists.[organization_name].org/archives.

Lists addresses will look like [list_name]@[organization_name].org.

A caveat: you can use a Mailman installation to manage lists for several domains, but two lists cannot have the same name even though its domains are different!

Mailman installation

Mailman configuration

The content of /etc/mailman/mm_cfg.py varies depending on the chosen mail server.

The full set of configuration defaults lives in the /usr/lib/mailman/Mailman/Defaults.py file, however you should never modify this file! Instead, change the mm_cfg.py file; you only need to add values to mm_cfg.py that are different than the defaults in Defaults.py. (Future Mailman upgrades are guaranteed never to touch your mm_cfg.py file.)

Postfix integration

Exim integration

DEFAULT_EMAIL_HOST = 'a.org'
MTA = None

Mail Server Configuration

Note: Ensure your domain name server (DNS) setup. For mail delivery on the internet, your DNS must be correct. An MX record should point to the mail host. More info about DNS is beyond the scope of this document.

Postfix

For installing and configuring this mail server, see Postfix. (If you will be using Postfix just for Mailman, its setup is much simpler: ignore all the mailbox and database stuff.)

Start Mailman

If you run into problems, run it more verbose so it can help you troubleshoot:

# /usr/lib/mailman/bin/mailmanctl start

Create a password

There are two type of passwords that you can create from the command line. The first is the "general password" which can be used anywhere a password is required in the system. The site password will get you into the administration page for any list, and it can be used to log in as any user.

The second password is a site-wide "list creator" password. You can use this to delegate the ability to create new mailing lists without providing all the privileges of the site password. Of course, the owner of the site password can also create new mailing lists, but the list creator password is limited to just that special role.

To set the general password, use this command:

# /usr/lib/mailman/bin/mmsitepass <general-password>

To set the list creator password, this:

# /usr/lib/mailman/bin/mmsitepass -c <list-creator-password>

It is okay not to set a list creator password, but you probably do want a general password.

Using Mailman

To administrate your lists (create and configure lists, manage users, etcetera) use the web interface; remember that each domain has its own. For example, the URL of organization "a" would be http://lists.a.org.

Mailman can be also managed by command-line. Example for list creation:

# newlist --urlhost=lists.b.org --emailhost=b.org list_name

Troubleshooting

You should check that your installation has all the correct permissions and group ownerships by running the check_perms script:

# /usr/lib/mailman/bin/check_perms

. If it reports problems, then you can either fix them manually or use the same program to fix them (probably the easiest solution):