diff options
| author | mailman | 1998-05-26 03:03:20 +0000 |
|---|---|---|
| committer | mailman | 1998-05-26 03:03:20 +0000 |
| commit | 9cc883ab657510710ec2ca9f2bfe9774fcb0d9ef (patch) | |
| tree | 123ce0cd2866fbb8c21eaeb0f19324a41f7decdb | |
| parent | dfef1387608cfa0bec9d705b5d7b6cbf69c2e59a (diff) | |
| download | mailman-9cc883ab657510710ec2ca9f2bfe9774fcb0d9ef.tar.gz mailman-9cc883ab657510710ec2ca9f2bfe9774fcb0d9ef.tar.zst mailman-9cc883ab657510710ec2ca9f2bfe9774fcb0d9ef.zip | |
Sending the password notices to -admin addr if new list option
reminders_to_admins is set.
| -rwxr-xr-x | cron/mailpasswds | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/cron/mailpasswds b/cron/mailpasswds index 27f34e4a2..4ee6a8ca8 100755 --- a/cron/mailpasswds +++ b/cron/mailpasswds @@ -21,7 +21,7 @@ We accumulate users and their passwords, and use the last list to send a single message to each user with their complete collection of passwords, rather than sending a single message for each password.""" -__version__ = "$Revision: 539 $" +__version__ = "$Revision: 541 $" # This puppy should probably do lots of logging. @@ -92,12 +92,17 @@ def main(): for name in mm_utils.list_names(): list = maillist.MailList(name) list_name = list.real_name + reminders_to_admins = list.reminders_to_admins for user, password in list.passwords.items(): url = list.GetOptionsURL(user) - if users.has_key(user): - users[user].append(list_name, password, url) + if reminders_to_admins: + recipient = "%s-admin@%s" % tuple(string.split(user, '@')) else: - users[user] = [(list_name, password, url)] + recipient = user + if users.has_key(recipient): + users[recipient].append(list_name, password, url) + else: + users[recipient] = [(list_name, password, url)] # Unlocking each list after identifying passwords, but before having # the consolidated list, means that there is a window for discrepancy # between the reported and actual password. Big deal - if the user |
