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 ClientCookie installed.

More information can be obtained by running the script with the --help option or just reading the beginning of the script.

Topica_Archives.py
Retrieve the archives of a lists.topica.com list in Unix mailbox format.
Topica_Subscribers.py
Retrieve a list of the subscribers of a lists.topica.com list along with real name, moderation and digest flags, etc.
mailman-subscribers.py
Obtain a list of subscribers to a Mailman list with various additional information.

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.

get_welcome
Reprint (not mail) the list welcome message for a user.
hddump
Dump the contents of a Pipermail archive database for a given list and archive volume. Possibly useful for diagnosing archive anomalies.
held
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).
hold_again
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_pending
List the contents of the pending requests file for a Mailman list.
list_requests
List the outstanding moderator requests for a Mailman list or lists. Optionally accept, reject or discard each listed request.
non_members
Add and or remove entries from one or more list's *_these_nonmembers filters.
post_from_mbox
Post all the messages in a *nix mbox file to a list.
prune_arch
Prune older messages from the archives of one or more lists.
remove_recips
List and/or remove recipients from a Mailman 'out' or 'retry' queue entry.
update_archive_mtime
Update the access and modification times of archived message files to match the archived time in the file.
set_attributes
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.

add_banned.py
Adds an address or regexp to the ban list of all lists.
change_admins.py
Set, add and/or remove owners and/or moderators of lists.
change_member_address.py
Changes a member's address.
created.py
Displays the created_at date for a list.
discard_address.py
Discards all held posts and held subscription requests from a given address.
discard_subs.py
Discards all held subscription requests older than a given number of days.
fix_bad_bounce_info.py
Removes bounce_info for any address that is not a list member. Normally, this situation should not occur. Also removes stale bounce info.
fix_minus_one.py
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.
fix_uc_address.py
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.
get_bounce_info.py
Prints the bounce information for all list members that have any.
last_post.py
Displays the last post time for a list or all lists.
list_mod.py
Lists either moderated or unmoderated members of a list.
remove_bad_address.py
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.
reset_bounce.py
Enables delivery for all members or all those in a given domain or those named members whose delivery is disabled by bounce.
set_mod.py
Set or unset moderation for one or more members on a list.
set_nodigest.py
Set a list's digestable flag to No and set all current digest members to regular delivery.
set_nodups.py
Sets all list members to not receive from the list those posts in which they are directly addressed in To: or Cc:
set_nomail.py
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_passwd.py
Set one or more of a list's admin, moderator or poster passwords.
set_unhide.py
Sets all members of a list to be 'unhidden'.
test_handler.py
Test the actions of a custom or standard handler against a test list and message.

These scripts are custom handlers. See the FAQ at http://wiki.list.org/x/l4A9 for information on custom handler installation.

See the first part of each script for additional information.

MoreHolds.py
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.
PostLimit.py
Implements a per time period limit for a member's posts to a list and/or total posts to the list.