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.
- An enhanced version of the standard Mailman bin/cleanarch which will also
fix Date: headers which are unparseable or have dates more than
ARCHIVER_ALLOWABLE_SANE_DATE_SKEW different from the Unix-From date.
- 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.
- A script for redacting selected message subjects and optionally author
names in a Pipermail archive database.
- 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.
- A script based on the standard add_members script, but sends invitations
instead of directly adding members. It also allows specifying additional
text to be included at the top of the invitation.
- 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.
- Clears bounce info for members with recorded bounces. Does not re-enable
delivery. See reset_bounce.py for that.
- 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.
- Sometimes a site applies a patch to Mailman which adds and then uses new
list attributes, but because the patch might be against an older release, it
may not cause version updating to be done on existing lists. If that happens,
this script will force version updating to be done for the list(s) it is run
- 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.
- An alternative to fix_url.py to set https scheme in web_page_url for
all lists at once.
- Displays the last post time for a list or all lists.
- List the contents of subscribe_auto_approval, ban_list and *_these_nonmembers
for a list or lists.
- Lists either moderated or unmoderated members of a list. (Beginning in
Mailman 2.1.21, bin/list_members can do this.)
- Rebuilds the archive TOC page for a list or lists if *.txt.gz files have
been removed and the TOC links are not to the *.txt files.
- 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.