summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbwarsaw1999-09-02 16:16:35 +0000
committerbwarsaw1999-09-02 16:16:35 +0000
commitaa508a71009874cfac13338a85f9b451d6072e77 (patch)
treef6da7f50303a5ed6e6f45544e3759335311a2e3f
parent154eaac3ecf7ead8077f9016a54b11b0a1b3b771 (diff)
downloadmailman-aa508a71009874cfac13338a85f9b451d6072e77.tar.gz
mailman-aa508a71009874cfac13338a85f9b451d6072e77.tar.zst
mailman-aa508a71009874cfac13338a85f9b451d6072e77.zip
Two changes:
- be sure to use the member's case-preserved subscribed address - watch out for any addresses that are in the password dictionary but are (for some unknown reason) not subscribed. Zap any such addresses found.
-rwxr-xr-xcron/mailpasswds17
1 files changed, 16 insertions, 1 deletions
diff --git a/cron/mailpasswds b/cron/mailpasswds
index 83610709e..a122c024c 100755
--- a/cron/mailpasswds
+++ b/cron/mailpasswds
@@ -142,14 +142,29 @@ def main():
# each entry in this dictionary is a list of tuples of the following
# form: (listaddr, listreq, password, url)
users = hosts.get(host, {})
+ badaddrs = []
for addr, passwd in mlist.passwords.items():
url = mlist.GetAbsoluteOptionsURL(addr)
- recip = mlist.GetMemberAdminEmail(addr)
+ realaddr = mlist.GetUserSubscribedAddress(addr)
+ if not realaddr:
+ badaddrs.append(addr)
+ continue
+ recip = mlist.GetMemberAdminEmail(realaddr)
userinfo = (listaddr, listreq, passwd, url)
infolist = users.get(recip, [])
infolist.append(userinfo)
users[recip] = infolist
hosts[host] = users
+ # were there any addresses that are in the password dictionary but are
+ # not subscribed?
+ if badaddrs:
+ mlist.Lock()
+ try:
+ for addr in badaddrs:
+ del mlist.passwords[addr]
+ mlist.Save()
+ finally:
+ mlist.Unlock()
if a_public_list:
MailAllPasswords(a_public_list, hosts)