[Mailman-Users] Script to list users with nomail property set to 1

Geoff Powell geoff at lanrex.com.au
Tue Feb 17 07:48:37 CET 2004


I have been using mailman's withlist feature with a basic python script
called nomail, to list all users in a database with the nomail property
set to 1, it looked something like:

import sys

from Mailman import mm_cfg

def nomail(list):
	for member in list.members.keys()
		if list.user_options[member] &&
			print member

	for member in list.digest_members.keys()
		if list.user_options[member] &&
			print member

(There could be errors in this code block)

Since updating the system, and mailman is now version 2.1.2-2, the
script is not working correctly. It appears to be printing out ALL users
in the database, indicating they all have the nomail field set to 1.

I have found that in /var/mailman/Mailman/Defaults.py, there is a line
with a comment next to DisableDelivery stating it is obsolete (and
DisableDelivery is set to 1, I assume this is why the users all have the
value as 1?). The line says I should use getDeliveryStatus(), is there
any documentation on how I can update my script to utilise this method,
or can anyone please give me a hint?

Thanks in advance,


More information about the Mailman-Users mailing list