'''/etc/postfix/main.cf''' should have the following fields and values:

'''/etc/postfix/main.cf''' should have the following fields and values:

−

<pre>

+

{{bc|1=

myhostname = arch.a.org

myhostname = arch.a.org

mydomain = a.org

mydomain = a.org

Line 80:

Line 78:

recipient_delimiter = +

recipient_delimiter = +

−

</pre>

+

}}

=== Exim ===

=== Exim ===

Line 92:

Line 90:

'''/etc/nginx/conf/nginx.conf''' should include the following configuration per domain (example for ''a.org''):

'''/etc/nginx/conf/nginx.conf''' should include the following configuration per domain (example for ''a.org''):

−

<pre>

+

{{bc|1=

server {

server {

server_name lists.a.org;

server_name lists.a.org;

Line 121:

Line 119:

}

}

−

</pre>

+

}}

=== Lighttpd ===

=== Lighttpd ===

Revision as of 13:12, 22 November 2011

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

# pacman -S mailman

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.)

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.)

Lighttpd

Apache

Post Configuration

Site-wide mailing list

To create this specific list requested by Mailman for its proper operation (between other things, it is used for password reminders), run

# /usr/lib/mailman/bin/newlist mailman

. This will create a list called "mailman" under the default domain (mailman@a.org in the example). You do not have to do it for the other domains (i.e. b.org and c.org).

Later you should also subscribe yourself to the site list.

Set up cron

Several Mailman features occur on a regular schedule, so you must set up cron to run the right programs at the right time.

# cd /usr/lib/mailman/cron/
# crontab -u mailman crontab.in

Start Mailman

You can run

# rc.d start mailman

or do

# /etc/rc.d/mailman start

(it is the same). Although you can try —just for the first time—

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

, which is more verbose and can help you troubleshooting.

Then, do not forget to modify your /etc/rc.conf so Mailman starts at boot.

DAEMONS=(... mailman)

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 lists.a.org.

Mailman can be also managed by command-line.

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):