summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorklm1998-11-01 15:49:44 +0000
committerklm1998-11-01 15:49:44 +0000
commit8cf5cb147eb2b5aa1cfbddcb16f6590126e95b90 (patch)
tree40e0a3cd5072382d22ea57baaddc7bc530f95893
parentb39482849502170be731faffd3dd052246bede6a (diff)
downloadmailman-8cf5cb147eb2b5aa1cfbddcb16f6590126e95b90.tar.gz
mailman-8cf5cb147eb2b5aa1cfbddcb16f6590126e95b90.tar.zst
mailman-8cf5cb147eb2b5aa1cfbddcb16f6590126e95b90.zip
main(): A small kludge to ensure that we use an advertised list, if
any is available, for actually sending out the passwords reminders. Otherwise, an unadvertised list may be used (and will be, if there are no advertised ones on the system), putting its name in the list-id header, and so forth. The proper fix will be to not use a list object, at all, to do the sends - use Utils.SendTextToUser, or something, directly. This should be fixed before full release - we just need to identify the proper headers - who should be the sender, where should failure notices go, etc, etc. Hmm - it would be nice to have a special return address that would do the bounce processing, but look for and handle the bad address on *all* the lists to which it belongs...
-rwxr-xr-xcron/mailpasswds6
1 files changed, 5 insertions, 1 deletions
diff --git a/cron/mailpasswds b/cron/mailpasswds
index 2f968951f..fede7338e 100755
--- a/cron/mailpasswds
+++ b/cron/mailpasswds
@@ -85,8 +85,11 @@ def main(args):
users = {} # user: (listname, password, url)
# Constrain to specified users, if any.
confined_to = args[1:]
+ a_public_list = None
for name in Utils.list_names():
list = MailList.MailList(name, lock = 0)
+ if not a_public_list and not list.advertised:
+ a_public_list = list
list_name = list.real_name
umbrella_list = list.umbrella_list
if not list.send_reminders:
@@ -96,6 +99,7 @@ def main(args):
if user not in confined_to:
continue
else:
+ # We're a bit verbose when operating "confined_to":
print "%s in %s" % (user, list.real_name)
url = list.GetAbsoluteOptionsURL(user)
recipient = list.GetMemberAdminEmail(user)
@@ -104,7 +108,7 @@ def main(args):
else:
users[recipient] = [(list_name, password, url)]
if list:
- MailAllPasswords(list, users)
+ MailAllPasswords(a_public_list or list, users)
def waitall():
"""Return only when there are no forked subprocesses running."""