summaryrefslogtreecommitdiff
path: root/Mailman/Queue/CommandRunner.py
diff options
context:
space:
mode:
authorbwarsaw2001-03-01 05:42:13 +0000
committerbwarsaw2001-03-01 05:42:13 +0000
commit1d71e15e3c02a516b511f166915ba6261a02e46b (patch)
tree249d5b721cacc209150b693d4fb7f0c435bee113 /Mailman/Queue/CommandRunner.py
parent27a1736b228779f1e04ddfbb652b24585611a5b0 (diff)
downloadmailman-1d71e15e3c02a516b511f166915ba6261a02e46b.tar.gz
mailman-1d71e15e3c02a516b511f166915ba6261a02e46b.tar.zst
mailman-1d71e15e3c02a516b511f166915ba6261a02e46b.zip
Diffstat (limited to 'Mailman/Queue/CommandRunner.py')
-rw-r--r--Mailman/Queue/CommandRunner.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/Mailman/Queue/CommandRunner.py b/Mailman/Queue/CommandRunner.py
index f4b7be0f8..601f8bee6 100644
--- a/Mailman/Queue/CommandRunner.py
+++ b/Mailman/Queue/CommandRunner.py
@@ -36,6 +36,18 @@ class CommandRunner(Runner):
slice, numslices, cachelists)
def _dispose(self, mlist, msg, msgdata):
+ # Try to figure out whether the message was destined for the -owner or
+ # -admin address. This used to be calculated in the mailowner script,
+ # but now that's too expensive, so we do it here if the message
+ # metadata doesn't already tell us.
+ #
+ # Yes, the key really is `toauthoritah', Cartman.
+ if msgdata.get('toauthoritah'):
+ del msgdata['toauthoritah']
+ if msg['to'].lower() == mlist.GetOwnerEmail():
+ msgdata['toowner'] = 1
+ else:
+ msgdata['toadmin'] = 1
# BAW: Not all the functions of this qrunner require the list to be
# locked. Still, it's more convenient to lock it here and now and
# deal with lock failures in one place.