summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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()