Here are some scripts that automate certain mailing list management tasks.
They are written in Python.
The next three scripts require that you have Python installed on
your workstation. They normally
require Python 2.4 or later, but they will work with some earlier versions
(2.0 +) if you have
More information can be obtained by running the script with the --help option
or just reading the beginning of the script.
- Retrieve the archives of a lists.topica.com list in Unix mailbox
- Retrieve a list of the subscribers of a lists.topica.com list along
with real name, moderation and digest flags, etc.
- Obtain a list of subscribers to a Mailman list with various additional
The rest of the scripts do not require Python on your workstation.
They run on the Mailman host machine. Thus, they
require command line access to the Mailman installation.
The next scripts are designed to run from Mailman's bin/ directory
in the same manner as Mailman's other command line tools.
Run the script with the --help option for more information.
- Check an archive mbox for inconsistencies. This is a compliment to
the standard bin/cleanarch. It checks and reports more anomalies than
cleanarch, but it doesn't attempt to fix anything.
- Create a clone of an existing list with a new name (requires python 2.7).
- Like clone_list but works with python 2.5+. See comments in script for
Python 2.3 and 2.4.
If python 2.7 is available, clone_list is preferred as its argument
parsing and help are more robust.
- Remove an address or all addresses matching a regexp from the installation.
I.e. for every list, if the address is a member, it is removed. If there are
any held posts or (un)subscription requests from the address, they are removed
too. Optionally, any subscription requests from the address waiting user
confirmation are also removed.
- Reprint or remail the list welcome message for a user.
- Dump the contents of a Pipermail archive database for a given list and
archive volume. Possibly useful for diagnosing archive anomalies.
- Process held messages. Like bin/discard but allows accepting or rejecting
as well as discarding the message(s) and optionally forwarding and/or
preserving the processed message(s).
- If the request.pck entry corresponding to a heldmsg-LIST-nn.* held message
file has been somehow lost so the held message is not in the admindb
interface, this script can requeue the message from the heldmsg-LIST-nn.*
file to the in queue so it will be reprocessed and presumably held again.
- List the contents of the pending requests file for a Mailman list.
- List the outstanding moderator requests for a Mailman list or lists.
Optionally accept, reject or discard each listed request or, also
optionally, all remaining requests of that type for that list.
- Add and or remove entries from one or more list's *_these_nonmembers
- List various information about lists and their held posts for all lists
that have held posts older than a specified number of days.
- Post all the messages in a *nix mbox file to a list.
- Prune older messages from the archives of one or more lists.
- Recode the strings in list attributes from one encoding to another. This
is useful if Mailman's encoding for a list's preferred_language is changed.
- List and/or remove recipients from a Mailman 'out' or 'retry'
- Update the access and modification times of archived message files to
match the archived time in the file.
- Display the various options and settings for a member of a list.
Works as is for Python 2.5+. See comment in the script for Python 2.3
- Unlike the other scripts in this section, this is a bash script which
accepts arguments of the form "attribute = value" and invokes
Mailman's bin/config_list to update those attributes for a list.
This simplifies config_list usage for setting just one or a few things for
a single list.
The next group of scripts are 'withlist' scripts that run under control
of Mailman's bin/withlist script on the Mailman host machine.
See the first part of each script for additional information.
- Adds an address or regexp to the ban list of all lists.
- Set, add and/or remove owners and/or moderators of lists.
- Changes a member's address.
- Displays the created_at date for a list.
- Discards all held posts and held subscription requests from a given
- Discards all held subscription requests older than a given number of
- Removes bounce_info for any address that is not a list member.
Normally, this situation should not occur. Also removes stale bounce info.
- Fixes the "-1 requests pending" bug in 2.1.5 if there are more lists
affected than is convenient to fix by visiting the admindb pages.
- Find all list members with upper case in their non-case preserved
member email addresses and convert to lower case or remove them if
the lower case member exists.
- Prints the bounce information for all list members that have any.
- Displays the last post time for a list or all lists.
- Lists either moderated or unmoderated members of a list.
- Removes syntactically invalid addresses from a list.
This should normally only be required in cases where the address contains
leading or trailing whitespace as the pipe
bin/list_members -i <listname> | bin/remove_members -f - <listname>
should suffice otherwise.
- Enables delivery for all members or all those in a given domain
or those named members
whose delivery is disabled by bounce.
- Sets the Acknowledge posts option for all regular member addresses on
a list or lists that match a supplied argument.
- Set every list member's digest format to MIME and set the list's
mime_is_default_digest to MIME.
- Set or unset moderation for one or more members on a list.
- Set a list's digestable flag to No and set all current
digest members to regular delivery.
- Sets all list members to not receive from the list
those posts in which they are directly addressed in To: or Cc:
- Sets a list member's delivery to 'disabled by admin' or
optionally sets to 'disabled by bounce' and starts the notification
and deletion process.
- Set one or more of a list's admin, moderator or poster passwords.
- Sets all members of a list to be 'unhidden'.
- Test the actions of a custom or standard handler against a test list
These scripts are custom handlers. See the FAQ at
for information on custom handler installation.
See the first part of each script for additional information.
- Implements holds for messages with no Subject:, messages which quote
digest boiler plate and (experimental) messages which quote excessively.
Also see rejectquote.txt for a sample
reject message template used by this script.
- Implements a per time period limit for a member's posts to a list
and/or total posts to the list.