diff options
| author | bwarsaw | 2000-09-15 20:56:21 +0000 |
|---|---|---|
| committer | bwarsaw | 2000-09-15 20:56:21 +0000 |
| commit | a4e0e40375e1ba58f9b15f40e3f58af8bee1ad8b (patch) | |
| tree | 7609f5fddc3ea802e44b34c99dd9ce5cf0cce763 | |
| parent | 16e1c220a01309a0276f5d6f620dbb6fee70a478 (diff) | |
| download | mailman-a4e0e40375e1ba58f9b15f40e3f58af8bee1ad8b.tar.gz mailman-a4e0e40375e1ba58f9b15f40e3f58af8bee1ad8b.tar.zst mailman-a4e0e40375e1ba58f9b15f40e3f58af8bee1ad8b.zip | |
mail_passwords(): Set the msgdata in DeliverToUser() to contain the
"_nolist" volatile key, which indicates to the delivery pipeline that
it shouldn't include list specific information (e.g. List-Id:).
Closes SF bug #114127, Jitterbug PR#149.
main(): DeliverToUser() requires the list to be locked, so be sure to
lock a_public_list around the call to mail_passwords() otherwise
exceptions will occur and lock turds will be left!
| -rwxr-xr-x | cron/mailpasswds | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/cron/mailpasswds b/cron/mailpasswds index d86d41463..bdcb15dd6 100755 --- a/cron/mailpasswds +++ b/cron/mailpasswds @@ -81,7 +81,7 @@ def mail_passwords(mlist, hosts): text = text + header + '\n' + string.join(table, '\n') msg = Message.UserNotification(addr, mailman_owner, subj, text) msg['X-No-Archive'] = 'yes' - HandlerAPI.DeliverToUser(mlist, msg) + HandlerAPI.DeliverToUser(mlist, msg, {'_nolist': 1}) @@ -145,7 +145,12 @@ def main(): finally: mlist.Unlock() if a_public_list: - mail_passwords(a_public_list, hosts) + a_public_list.Lock() + try: + mail_passwords(a_public_list, hosts) + finally: + a_public_list.Save() + a_public_list.Unlock() |
