Tuesday, January 22, 2008

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!

No comments: