Mailman

by Gisle Hannemyr

This chapter explains mailing lists.

Table of contents

Introduction

[TBA]

Mailman

GNU Mailman is an application from managing electronic mailing lists. It is coded primarily in Python.

I currently don't provide mailinglists, but mailman was at one point installed at one of my servers. It has been removed and purged by using these commands:

$ sudo apt remove mailman
$ sudo apt autoremove mailman
$ sudo apt purge mailman
$ sudo apt autoremove --purge mailman

I've also removed the mailman aliases added to /etc/aliases. (For the purpose of this file, see this answer @ StackExchange.com.)

The default contents of /etc/aliases is:

# See man 5 aliases for format
postmaster:    root

The lines with the mailman aliases should be deleted, and the /etc/aliases.db need to be rebuilt afterwards:

$ postalias /etc/aliases

Then, examine /etc/postfix/transport. If it only contains Mailman-related entries, it can be deleted, along with /etc/postfix/transport.db.

If you delete /etc/postfix/transport, you should also delete the reference to it in /etc/postfix/main.cf. Look for a line like the one below, and delete it.

transport_maps = hash:/etc/postfix/transport

If you choose to retain /etc/postfix/transport, you ned to re-create the database after editing the file:

$ cd /etc/postfix
$ postmap transport

After doing all this, you need to check whether Postfix still is connected to Mailman. Errors and warnings like these will appear in /etc/mail.log if it is:

[…]: error: open database /var/lib/mailman/data/aliases.db: No such file or directory
[…]: warning: hash:/var/lib/mailman/data/aliases is unavailable. \
  open database /var/lib/mailman/data/aliases.db: No such file or directory
[…]: warning: hash:/var/lib/mailman/data/aliases: lookup of 'root' failed

These will typically be logged every five minutes. You can also check Postfix status:

$ sudo service postfix status

It will report the same three lines of errors and warnings.

To get rid of these delete the reference to it in /etc/postfix/main.cf. It will typically look like this:

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

Edit it, and remove the Mailman reference:

alias_maps = hash:/etc/aliases

Background: My question @ AskUbuntu.

Final word

[TBA]


Last update: 2020-08-28 [gh].