[Mailman-Users] nomail users

Dan Mick dmick at utopia.West.Sun.COM
Fri May 4 23:38:23 CEST 2001


>     When Mailman sets a user's 'nomail' option, there is no way that
> user would know, except for realizing after the fact that they're no
> longer receiving mail.  Is there any sort of mechanism (even third
> party) that can periodically probe those that have 'nomail' set?  Maybe
> once every 48 hours?  If successful, just send a note telling them their
> option has been set to 'nomail' and if they need it changed to get on
> the subscription page...  Something.

Here's my answer, which I've posted several times:

bin/withlist -r nomail <listname> | remind

nomail.py:

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)

remind (you'll need to customize the list name etc.)

#!/bin/ksh
for addr in "$@"; do
        echo "To: $addr" >/tmp/mail
        echo "Subject: scr mail for $addr is disabled" >>/tmp/mail
        cat >>/tmp/mail <<-EOM

        This is a reminder that your subscription to scr at socal-raves.org is
        currently disabled (still active, but you're not receiving mail).  This
        may be because you wanted it to be disabled, or it may be because the
        mailing-list software automatically disabled your mail because it
        couldn't deliver mail to you for an extended period (usually due to
        a full mailbox refusing more mail).

        If you want your account to be re-enabled, please visit your personal
        subscription page at the web site and re-enable your mail.  You can
        find that personal page's URL in your welcome message, or you can start
        by going to

                http://www.socal-raves.org/mailman/listinfo/scr

        and entering your email address $addr at the bottom, in the
        "scr Subscribers" section.

        This mail message was sent to $addr.
        EOM

        /usr/lib/sendmail -t -f listmaster at socal-raves.org </tmp/mail
done





More information about the Mailman-Users mailing list