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: <[email protected]>/ REJECT
/^Sender: <[email protected]>/ 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?
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):
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