[Mailman-Users] withlist docs?

Mark Sapiro mark at msapiro.net
Tue Nov 6 02:21:51 CET 2012


Josh Berkus wrote:
>
>I'd like to use withlist more to troubleshoot certain issues, but I
>can't find any documentation on the objects and methods available in the
>withlist context.  Do such docs exist somewhere?


There are two basic objects in Mailman. These are list objects and
message objects.

Message objects are a sub-class of the python email.message class which
is documented in the Python docs (e,g.
<http://docs.python.org/2/library/email.message.html#email.message>.
Mailman adds a few methods in the Message.Message class definition in
Mailman/Message.py.

List objects have many methods defined in several different modules,
but a good starting point is Mailman/MailList.py. Also, virtually
every method having to do with list members, including the low level
addNewMember(), removeMember() and changeMemberAddress() methods
called by higher level methods defined in Mailman/MailList.py, is
documented in Mailman/MemberAdaptor.py.


>For example, I'd like to figure out how to set all addresses in a
>certain domain nomail.  But I can't figure out:
>
>- what the parameters and outputs of getDeliveryStatusMembers are


Not the method you want. You want getMembers(), but both are documented
in Mailman/MemberAdaptor.py.


>- what the method is to set someone nomail


setDeliveryStatus() also documented in Mailman/MemberAdaptor.py.


You might look at the scripts at <http://www.msapiro.net/scripts/> as
examples of some of the things you might want to do. In particular,
<http://www.msapiro.net/scripts/reset_bounce.py> with a very small
change can disable delivery for all members in a given domain and
<http://www.msapiro.net/scripts/set_nomail.py> can disable delivery
for given members.

-- 
Mark Sapiro <mark at msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan



More information about the Mailman-Users mailing list