From 97cefe91e5e56ec3a9ea2b9fa548e7c6318f40d9 Mon Sep 17 00:00:00 2001 From: mailman Date: Sun, 22 Feb 1998 05:25:40 +0000 Subject: Initial revision --- cron/mailpasswds | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100755 cron/mailpasswds (limited to 'cron') diff --git a/cron/mailpasswds b/cron/mailpasswds new file mode 100755 index 000000000..8dea4c563 --- /dev/null +++ b/cron/mailpasswds @@ -0,0 +1,32 @@ +#!/usr/local/bin/python + +# This script gets called by cron. It goes through all the lists, +# and locks each list as it processes it. It goes through every +# address, and mails a password reminder. It isn't a big enough deal +# to worry about what happens if someone is on multiple lists. +# +# This puppy should probably do lots of logging. + + +import sys, os + +sys.path.append('/home/mailman/mailman/modules') + +import maillist, mm_cfg, mm_message + + +def MailPasswords(list): + for user in list.passwords.keys(): + list.MailUserPassword(user) + +dirs = os.listdir(mm_cfg.LIST_DATA_DIR) +for dir in dirs: + if not (os.path.exists(os.path.join( + os.path.join(mm_cfg.LIST_DATA_DIR, dir), 'config.db'))): + continue + try: + list = maillist.MailList(dir) + except: + continue + MailPasswords(list) + list.Unlock() -- cgit v1.2.3-70-g09d2