aboutsummaryrefslogtreecommitdiffstats
path: root/Mailman/Handlers/SMTPDirect.py
diff options
context:
space:
mode:
authorbwarsaw <>2003-02-08 07:14:13 +0000
committerbwarsaw <>2003-02-08 07:14:13 +0000
commit925200da11d52ae4d7fc664bff898f8050bef687 (patch)
tree389bbd6c076718221b427d6d6e4fa199a1729ec0 /Mailman/Handlers/SMTPDirect.py
parentdea51d7d5a5c5d8ea6900a838a12e230b7a000b6 (diff)
downloadmailman2-925200da11d52ae4d7fc664bff898f8050bef687.tar.gz
mailman2-925200da11d52ae4d7fc664bff898f8050bef687.tar.xz
mailman2-925200da11d52ae4d7fc664bff898f8050bef687.zip
Backporting from the trunk.
Diffstat (limited to 'Mailman/Handlers/SMTPDirect.py')
-rw-r--r--Mailman/Handlers/SMTPDirect.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/Mailman/Handlers/SMTPDirect.py b/Mailman/Handlers/SMTPDirect.py
index fd64f6f1..4724c3a1 100644
--- a/Mailman/Handlers/SMTPDirect.py
+++ b/Mailman/Handlers/SMTPDirect.py
@@ -25,6 +25,7 @@ Note: This file only handles single threaded delivery. See SMTPThreaded.py
for a threaded implementation.
"""
+import copy
import time
import socket
import smtplib
@@ -268,12 +269,20 @@ def verpdeliver(mlist, msg, msgdata, envsender, failures, conn):
# they missed due to bouncing. Neat idea.
msgdata['recips'] = [recip]
# Make a copy of the message and decorate + delivery that
- msgcopy = email.message_from_string(msg.as_string())
+ msgcopy = copy.deepcopy(msg)
Decorate.process(mlist, msgcopy, msgdata)
# Calculate the envelope sender, which we may be VERPing
if msgdata.get('verp'):
bmailbox, bdomain = Utils.ParseEmail(envsender)
rmailbox, rdomain = Utils.ParseEmail(recip)
+ if rdomain is None:
+ # The recipient address is not fully-qualified. We can't
+ # deliver it to this person, nor can we craft a valid verp
+ # header. I don't think there's much we can do except ignore
+ # this recipient.
+ syslog('smtp', 'Skipping VERP delivery to unqual recip: %s',
+ recip)
+ continue
d = {'bounces': bmailbox,
'mailbox': rmailbox,
'host' : DOT.join(rdomain),