Mailman

Jump to: navigation, search

Installation notes for package Mailman

By installing the mailman package, you will find configuration instruction at /usr/doc/packages/mailman/README.SuSE

The mailman web site is extremely good, but not openSUSE specific (there are some differences).

Basic configuration

Preparation

Install the package named mailman either through YaST or zypper. After that, mailman can be found in

/var/lib/mailman

- also written as ~mailman in the documentation; the home directory of the user named mailman -

/usr/lib/mailman

specially the "bin" folder with the mailman scripts (this folder is not in the PATH, so you have to type the whole path to execute them).

Do not forget to add these folders in your backup path, specially /var/lib/mailman/archives/.

The package is pre-configured to be used with the Apache web server and the Postfix MTA.

If this suites your installation, you should be done by working through the steps below:

Modify parameters in /etc/sysconfig/mailman

  MAILMAN_SMTPHOST
  MAILMAN_DEFAULT_NNTP_HOST
  MAILMAN_DEFAULT_EMAIL_HOST
  MAILMAN_DEFAULT_URL_HOST
  MAILMAN_VIRTUAL_HOSTS
  and run "SuSEconfig -module mailman".

MAILMAN_SMTPHOST is the mail server you used to relay messages. If it is running on the same system as mailman localhost might be used as value too.

MAILMAN_DEFAULT_EMAIL_HOST and MAILMAN_DEFAULT_URL_HOST can be set to your domain name (e.g. example.net).

While running SuSEconfig be aware this operation does not overwrite a manual modified /usr/lib/mailman/Mailman/mm_cfg.py file. Instead you find a file named /usr/lib/mailman/Mailman/mm_cfg.py.SuSEconfig.

The setting DELIVERY_MODULE = 'SMTPDirect' is of value if sendmail is used as MTA.

Set a site password

Call

/usr/lib/mailman/bin/mmsitepass

as user root to set your site master password.

Define aliases

Add /var/lib/mailman/data/aliases to the alias_maps statement in /etc/postfix/main.cf:

alias_maps = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases   

and reload the postfix service.

Make sure to add this at the end of the main.cf file. The last line in the file win, and the default is to have a blanc alias_maps line at the end of the file.

Alternatively, you can add the following line to /etc/sysconfig/postfix

POSTFIX_ADD_ALIAS_MAPS="hash:/etc/aliases, hash:/var/lib/mailman/data/aliases"

and let SuSEconfig do the job for you.

The aliases are used to direct the incoming mails to mailman, so if mailman receive the mails (and archive them, for example), the aliases are set correctly.

Propagate new list

Finally, call /usr/lib/mailman/bin/newlist mailman as user root to create the master mailing list. You will be prompted for a password.

This list is needed for the inner workings of Mailman. For details see /usr/share/doc/packages/mailman/README.

Apache configuration

In /etc/sysconfig/apache2, add MAILMAN to the APACHE_SERVER_FLAGS. To do this, call

a2enflag MAILMAN

and restart Apache:

With systemV init:

service apache2 restart

From 12.1 on, you can still use the same command, but the best way is to call

systemctl start apache2.service

Starting mailman

Call

systemctl start mailman.service

You can either create mailing lists through the web interface or with the newlist command as root (located in /usr/lib/mailman/bin).

In both cases, the lists' aliases are created automatically and propagated to the Postfix MTA.

To remove mailing lists, you need to use the command line

Important Changes

1) The configuration files have been relocated from

    /etc/mailman.*

to the directory

    /etc/mailman/

2) We now allow group names (in addition to group ids) in /etc/sysconfig/mailman.

Using other MTAs than Postfix

If you want to use Mailman with a different MTA, you should work through the following steps:

  1. change MAILMAN_MTA in /etc/sysconfig/mailman
  2. have a look at /usr/share/doc/packages/mailman/README.<your MTA>
  3. set MAILMAN_MAIL_GID in /etc/sysconfig/mailman accordingly to what gid your MTA uses when running script aliases - if you use Sendmail, this is probably 2 (group daemon) you can either specify a group name or a numeric group id
  4. run SuSEconfig -module mailman
  5. check that /var/lib/mailman/data/aliases is used as alias table by your MTA and reload your MTA

Using other web servers than Apache

If you want to use Mailman with a different web server, you should work through the following steps:

- create script aliases and path aliases as pointed out in

 /usr/share/doc/packages/mailman/INSTALL, section "4. Final system set-up"

- set MAILMAN_CGI_GID in /etc/sysconfig/mailman accordingly to what gid your

 web server uses when running cgi scripts
 you can either specify a group name or a numeric group id

- run "SuSEconfig -module mailman"

Cron entries

Cron entries needed by Mailman are located in /usr/lib/mailman/cron/crontab and are copied into /etc/cron.d/ when Mailman is started (with /usr/sbin/rcmailman or via systemctl).

If you want to make some changes in the crontab, please modify the source file and reload the service.

Starting/Stopping/Reloading

You should not use mailmanctl for these tasks. Use rcmailman {start|stop|status|try-restart|restart|force-reload|reload}


Upgrading

Your old list configurations (including archives) should have been updated automatically during the installation of this package. However, you can invoke Mailman's update script (/usr/lib/mailman/bin/update) without harm.

The lists' aliases can be re-generated by Mailman's genaliases script (/usr/lib/mailman/bin/genaliases). Dependent on the settings in /etc/sysconfig/mailman these aliases will be written to a built-in file, to the screen or nowhere at all.

If you upgrade your installation from 2.1.3 or below, please note that you now have to specific the right wrapper groups in /etc/sysconfig/mailman. With 2.1.3 or below, you could simply leave the wrapper groups empty and SuSEconfig would assume default values. Now, if you leave these wrapper groups empty, SuSEconfig won't touch /etc/mailman.cgi-gid and /etc/mailman.mail-gid. Maybe that's what you want ;)

Editing List Archives

This package features a patch by Adriane Boyd that makes it possible for list administrators to edit their list archives through a web interface linked into the admin interface. A new cgi script called editarch allows administrators to browse by month and delete messages from the archives. The messages are immediately deleted from the mbox file, but because of the overhead in reprocessing archives, the archives aren't redone on-the-fly. Instead, a file is kept with a running list of recently edited archives and a nightly cron job does the reprocessing. The file location is configurable in mm_cfg. (Note: since it has to read through the mbox file message by message, pages will load slowly for lists with large archives.)

New options to list_lists

A patch has been applied which adds more options to list_lists. See "list_lists --help" for details.