7

I have been asked to disable a single mailing list on mailman. I do not want to destroy the list - we may want to revive it later. Also, we want to keep the archives accessible for the list members.

We are using mailman 2.1.14, with Postfix 2.9.6, on a VM running Ubuntu 12.04.

It seems that mailman does not have an option to disable a list. Searching the web, I found that I should instead solve this at the level of the MTA.
Specifically for Postfix, I found that I should use header_checks.
(For reference, I found a similar advice for sendmail users).

I have updated the /etc/postfix/main_cf:

# Disable mailing lists
header_checks = pcre:/etc/postfix/header_checks.pcre

And created an /etc/postfix/header_checks.pcre file containing:

/^Sender: <test-ml-bounces@example.com>/ REJECT
/^Sender: <real-ml-bounces@example.com>/ REJECT

(All mails come with "-bounces" attached to the Sender, for some reason).

Then I sent a mail to the test mailing list, and it did not arrive or appear in the archives - as intended.
A mail I had sent before changing the configuration had arrived in my mailbox and in the archives, also as intended.

The question is - is this a proper way of doing this? Or could this setup cause me trouble later on?

S.L. Barth
  • 301
  • 1
  • 5
  • 20

1 Answers1

5

It should be possible to remove the list's aliases from postfix by editing the mailman/data/aliases file (see integrating postfix and mailman)

Other options (from this question):

  • You could use the emergency moderation feature of a mailing list to prevent any mail delivery (although the moderators would still receive emails if someone mails the list
  • Change the rights on the list files: chmod 000 lists/LISTNAME, and when you want to re-enable the list, chmod 2775 lists/LISTNAME. If the list has public archives and you want to disable access to them, rm archives/public/LISTNAME*. When you re-enable the list, these symlinks will be automatically recreated when you access the list. In this case you may still want to remove the list's aliases from postfix as above
David Fraser
  • 406
  • 6
  • 12