[Mailman-Users] Announcement list magic...

Dan Mick dmick at utopia.West.Sun.COM
Fri May 4 04:16:45 CEST 2001


> 1) Is there a way to extract only the members that are not set to nomail?
>    I want to exclude people who are set to nomail because of choice or
>    because of bouncing email.

You could hack this bin/withlist script, which finds the "nomail"
members:

import sys
import Mailman.mm_cfg

def nomail(list):

   for member in list.members.keys():
      try:
         if list.user_options[member] & Mailman.mm_cfg.DisableDelivery:
            print member
      except:
         print >> sys.stderr, "%s has no user_options" % member
         pass

   for member in list.digest_members.keys():
      try:
         if list.user_options[member] & Mailman.mm_cfg.DisableDelivery:
            print member
      except:
         # normal for digest_members to have no options; means MIME digests
         pass
   sys.exit(0)






More information about the Mailman-Users mailing list