Mailing List Server

All gnu and nongnu (there are other domains too) mailing lists are processed on lists.gnu.org using the Mailman package. This machine is managed by FSF admins. Savannah admins have only non-root access and are able to perform limited mailing list-related administration tasks.

This page describes commands to manually manage mailing lists by Savannah administrators. See also:

  • MailSystem - various email and mailing list-related details in Savannah and GNU systems.
  • MailingListsInternals - the interface between Savannah PHP frontend and Mailman.

General

Some Mailman admin tasks need to be performed on the actual machine where Mailman is installed, while others, such as changing the password for a list, can be done via the web interface and the site-wide admin mailman password.

In order to do this you need to have shell access to lists.gnu.org - the machine that runs the master Mailman installation. If you require such access, ask one of the other Savannah admins to add your ssh public key.

Once your ssh public key has been added, you can log in as the user 'list'. You will be greeted with the bash prompt:

$ ssh list@lists.gnu.org
lists:~ $

From here you can perform all sorts of Mailman administrative tasks, such as those discussed below. See also: ResetListPassword.

On lists.gnu.org, there is a symlink ~list/mailman which must point to the active mailman installation (maintained by FSF sysadmin), or nothing will work right.

Mailman home page

List creation

Group admins can create their own mailing lists through the normal web interface. (This results in an ssh connection to lists.gnu.org and newlist being run there; see the MailSystem page.)

For lists whose names do not follow an allowed pattern, Savannah hackers when in the 'superuser' mode will have an additional template in the 'Create a new mailing list' section of /mail/admin/?group=<unix_group_name>. That field consists of just '%NAME', so it allows arbitrary names. The historical procedure using scripts is described at the bottom of this page.

Simple aliases, as opposed to mailman lists, can be created in fp.gnu.org:/com/mailer/aliases.

List reassignment

/siteadmin/mailman.php provides a way for superusers to attach a mailing list to a Savannah group or move it from one group to another.

Likewise, /mail/admin/?group=<unix_group_name> adds a control for superusers to remove lists from the database without removing them in Mailman.

Switch from nongnu to gnu

You need to edit the list configuration, and the FSF-specific virtual domain support (the domains/ subdirectory from the list directory).

Here are the commands, on list.gnu.org:

newdomain=gnu  # or nongnu
withlist -l -r fix_url $list_name -u lists.$newdomain.org
go $list_name
cd domains
mv nongnu.org gnu.org
# or 'mv gnu.org nongnu.org' if going the other way
# or 'touch gnu.org nongnu.org' to accept mail at both domains

There is an hourly cron job that collects the "domains" information, so changes are not instantaneous.

Disabling a list

We do not remove list archives when it was a public archive. Instead, we deactivate a list, so it cannot receive mail, while keeping archives and the list configuration (members and other settings). On lists.gnu.org:

cd /home/list/mailman/lists/listname/domains
mv gnu.org gnu.org.disabled-yourname-date
# mv nongnu.org nongnu.org.blah ...

Then, in the Privacy form in the mailman interface, set the "advertised" variable to "no"; and on the General Options page, ensure that "respond_to_post_requests" is also "no". Equivalently:

config_list -i ~/mm-configs/noadvertise.txt LISTNAME
config_list -i ~/mm-configs/norespond.txt LISTNAME

Then, remove any heldmsg-listname* pending messages from ~list/mailman/data.

Deleting a list

In contrast, if you really want to delete a list (not likely), you can tell Mailman to delete a list:

rmlist listname

If you want to go even further and delete the archives (even less likely):

listname=LISTNAME
rmlist -a $listname
# purge pending requests
ls -U /home/list/mailman/data | grep '^heldmsg-$listname-[0-9]+.pck$' | xargs rm
# Note: with a live list, purging should be followed by this, so Mailman take the removals into account:
# curl http://lists.gnu.org/mailman/admindb/testlist -F adminpw=******
# (ToDo: backup the archives somewhere for a little while)

# with mharc, for public archives
mv ~/mbox/$listname ~/archive/mbox
mv ~/html/$listname ~/archive/html

In the above, $listname doesn't have any @domain.tld part. Some mailing lists contain both private and public archives, so beware.

Renaming a mailing list

http://list.org/faq.html ("Q. How do I rename a list?") - apparently it's pretty messy to cleanly rename a list. Beware that by renaming a list, you change the archives URLs, and hence break lots of links. Stable archive links is something people often care about.

Commands:

if [ -e /var/mailman/lists/$new ]; then exit 1; fi
# list@lists.gnu.org
mv /var/mailman/lists/$old /var/mailman/lists/$new
mv /var/mailman/archives/private/$old /var/mailman/archives/private/$new
mv /var/mailman/archives/private/$old.mbox /var/mailman/archives/private/$new.mbox
if [ -h /var/mailman/archives/public/$old ]; then
  rm -f /var/mailman/archives/public/$old
  ln -sf /var/mailman/archives/private/$new /var/mailman/archives/public/$new
fi
for i in /var/mailman/data/heldmsg-$old-*; do
  if echo $i | grep 'heldmsg-'$old'-\([0-9]\+\).pck$' > /dev/null; then
    mv $i `echo $i | sed 's,heldmsg-'$old'-\([0-9]\+\).pck$,heldmsg-'$new'-\1.pck,'`
  fi
done
ssh -l mharc lists.gnu.org

# mharc@lists.gnu.org
mv mbox/$old mbox/$new
mv html/$old html/$new
  • rename in Savannah database if attached to a Savannah group (using internal0.savannah.gnu.org for this is preferred):

UPDATE savane.mail_group_list SET list_name='NEW' WHERE list_name='OLD';

Message deletion from archives

Sometimes people ask to remove a message from the archives, because they don't want their address harvested, or for some legality, or whatever.

As a policy, we do not have to implement all such requests; deletion for spam purposes is typically useless since it's already been mirrored in many places.

If you do delete a message, it is usually better to edit it to make the body/headers/whatever empty, instead of actually deleting it. Deletion will change all the existing url's. Here's the procedure:

ssh mharc@lists.gnu.org
cd mbox/listname
edit file
cd ~/bin
./web-archive -rebuild listname # remake html

It's CRUCIAL to run web-archive as the mharc user.

Historical: creating lists using scripts

This is an obsolete part of the 'List creation' section of this page.

For lists whose names do not follow an allowed pattern, Savannah hackers must manually run ~/mycreate_list.pl on lists, and then attach the list to the given group using ~/bin/ml.pl on root@mgt0:

~/bin/ml.pl -a yourlogin -g group -l listname
# check if there's no error
~/bin/ml.pl -a yourlogin -g group -l listname | mysql savane