Mailing Lists

Mailman is installed on to run OpenStack related mailing lists, as well as host list archives.

Adding a List

A list may be added by adding it to the openstack-infra/system-config repository in modules/openstack_project/manifests/lists.pp. For example:

maillist { 'openstack-foo':
  ensure      => present,
  admin       => '',
  password    => $listpassword,
  description => 'Discussion of OpenStack Foo',
  webserver   => $listdomain,
  mailserver  => $listdomain,

Scripted Changes to Lists

This may only be performed with root access to the list server.

Mailman supports running a python code snippet in the context of individual lists or every list on the system. The following example adds an address to the list of banned addresses for every list. This has proved useful in the case of attackers abusing the HTTP subscription interface to subscribe a target’s address to multiple mailing lists.

Banning an Address from All Lists

Create the file /usr/lib/mailman/bin/ with the following content:

def ban(m, address):
        if address not in m.ban_list:

And then run the withlist script as:

sudo -u list /usr/lib/mailman/bin/withlist -a -r ban "<address to ban>"

Because the script itself handles locking, do not use the -l argument to withlist. To run the same script on a single list, use:

sudo -u list /usr/lib/mailman/bin/withlist -r ban listname "<address to ban>"

Note that the ban list accepts regular expressions, so to ban an address and all suffixes, use '^address.*‘ as the “address to ban”.

Table Of Contents

Previous topic


Next topic


Project Source

This Page