Mailman power user trick

At work, we use the Mailman mailing list management program. We needed to change 700+ users from digest to non-digest format in a Mailman mailing list. Here’s how you do it:


# ./withlist -l org-announce

Loading list org-announce (locked)
The variable `m' is the org-announce MailList instance
>>> from Mailman import mm_cfg
>>> for member in m.getDigestMemberKeys():
... m.setMemberOption(member, mm_cfg.Digests, 0)
...
>>> m.Save()
>>>
Unlocking (but not saving) list: org-announce
Finalizing


The only tricky part of this is actually finding the commands to run. I did a search through the Mailman archives. I used the searchable version of the Mailman users’ list located here: http://www.mail-archive.com/mailman-users@python.org/

I did a search for “digest withlist”. Withlist is the swiss army knife tool of Mailman. The recipe above was provided by Mark Sapiro. Thanks to Mark and to all the Mailman gurus!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s