summaryrefslogtreecommitdiff
path: root/src/mailman/runners/lmtp.py
diff options
context:
space:
mode:
authorBarry Warsaw2014-12-15 13:06:58 -0500
committerBarry Warsaw2014-12-15 13:06:58 -0500
commite94434bf2b3e1cfd34028a7bbc804ec8a8ee3788 (patch)
treef2ad4f068538b458616ad8b1f0b9f6d46e781478 /src/mailman/runners/lmtp.py
parentd0c53890bf0c8aa531d45958f0e25fdaccbdb133 (diff)
downloadmailman-e94434bf2b3e1cfd34028a7bbc804ec8a8ee3788.tar.gz
mailman-e94434bf2b3e1cfd34028a7bbc804ec8a8ee3788.tar.zst
mailman-e94434bf2b3e1cfd34028a7bbc804ec8a8ee3788.zip
Use listid instead of (fqdn) listname in the metadata pickle.
load_external() now always opens in utf-8 mode. More test repair.
Diffstat (limited to 'src/mailman/runners/lmtp.py')
-rw-r--r--src/mailman/runners/lmtp.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mailman/runners/lmtp.py b/src/mailman/runners/lmtp.py
index cb5b4a017..daa1e7e1c 100644
--- a/src/mailman/runners/lmtp.py
+++ b/src/mailman/runners/lmtp.py
@@ -206,18 +206,19 @@ class LMTPRunner(Runner, smtpd.SMTPServer):
for to in rcpttos:
try:
to = parseaddr(to)[1].lower()
- listname, subaddress, domain = split_recipient(to)
+ local, subaddress, domain = split_recipient(to)
slog.debug('%s to: %s, list: %s, sub: %s, dom: %s',
- message_id, to, listname, subaddress, domain)
- listname += '@' + domain
+ message_id, to, local, subaddress, domain)
+ listname = '{}@{}'.format(local, domain)
if listname not in listnames:
status.append(ERR_550)
continue
+ listid = '{}.{}'.format(local, domain)
# The recipient is a valid mailing list. Find the subaddress
# if there is one, and set things up to enqueue to the proper
# queue.
queue = None
- msgdata = dict(listname=listname,
+ msgdata = dict(listid=listid,
original_size=msg.original_size,
received_time=received_time)
canonical_subaddress = SUBADDRESS_NAMES.get(subaddress)