summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormailman1998-02-22 05:25:40 +0000
committermailman1998-02-22 05:25:40 +0000
commit97cefe91e5e56ec3a9ea2b9fa548e7c6318f40d9 (patch)
treeab54e9583a03ad340c93edb64b47038aa73648e9
parent7843139ee78e44263ccbbf72e04721f542a40c5e (diff)
downloadmailman-97cefe91e5e56ec3a9ea2b9fa548e7c6318f40d9.tar.gz
mailman-97cefe91e5e56ec3a9ea2b9fa548e7c6318f40d9.tar.zst
mailman-97cefe91e5e56ec3a9ea2b9fa548e7c6318f40d9.zip
-rwxr-xr-xcron/mailpasswds32
1 files changed, 32 insertions, 0 deletions
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()