summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbwarsaw2001-10-04 14:44:12 +0000
committerbwarsaw2001-10-04 14:44:12 +0000
commit51920fdb683fd5edb4684606ee695c4be2735b0b (patch)
tree90ac63e20282568065f073d9d103f7aa0618b408
parentf7c9ad76271d8fd9a7ab15e7a2fab86a713ad62c (diff)
downloadmailman-51920fdb683fd5edb4684606ee695c4be2735b0b.tar.gz
mailman-51920fdb683fd5edb4684606ee695c4be2735b0b.tar.zst
mailman-51920fdb683fd5edb4684606ee695c4be2735b0b.zip
-rw-r--r--Mailman/Handlers/SMTPDirect.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/Mailman/Handlers/SMTPDirect.py b/Mailman/Handlers/SMTPDirect.py
index b53b42e9f..78cfe3686 100644
--- a/Mailman/Handlers/SMTPDirect.py
+++ b/Mailman/Handlers/SMTPDirect.py
@@ -24,7 +24,6 @@ isn't locked while delivery occurs synchronously.
"""
import os
-import string
import time
import socket
import smtplib
@@ -52,8 +51,10 @@ def process(mlist, msg, msgdata):
return
if mlist:
admin = mlist.GetAdminEmail()
+ listname = mlist.internal_name()
else:
admin = Utils.get_site_email()
+ listname = '<no list>'
msgtext = msg.as_string(unixfrom=0)
#
# Split the recipient list into SMTP_MAX_RCPTS chunks. Most MTAs have a
@@ -76,7 +77,7 @@ def process(mlist, msg, msgdata):
'size' : len(msgtext),
'#recips' : len(recips),
'#refused': len(refused),
- 'listname': mlist.internal_name(),
+ 'listname': listname,
'sender' : msg.get_sender(),
})
@@ -151,7 +152,7 @@ def chunkify(recips, chunksize):
buckets = {}
for r in recips:
tld = None
- i = string.rfind(r, '.')
+ i = r.rfind('.')
if i >= 0:
tld = r[i+1:]
bin = chunkmap.get(tld, 0)