Skip to content

Commit 646fe3a

Browse files
committed
update
1 parent 04f59ca commit 646fe3a

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

Mailman/Handlers/SMTPDirect.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ def process(mlist, msg, msgdata):
214214
deliveryfunc = bulkdeliver
215215

216216
try:
217-
origrecips = msgdata['recips']
217+
origrecips = msgdata.get('recips', None)
218218
origsender = msgdata.get('original_sender', msg.get_sender())
219219
conn = Connection()
220220
try:
@@ -399,7 +399,7 @@ def bulkdeliver(mlist, msg, msgdata, envsender, failures, conn):
399399
# Get the list of recipients
400400
recips = msgdata.get('recipients', [])
401401
if not recips:
402-
mailman_log('error', 'No recipients found in msgdata')
402+
mailman_log('error', 'SMTPDirect: No recipients found in msgdata for message:\n%s', msg.get('Message-ID', 'n/a'))
403403
return
404404

405405
# Convert email.message.Message to Mailman.Message if needed

Mailman/Queue/IncomingRunner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ def _dispose(self, mlist, msg, msgdata):
182182
recipients = msgdata.get('recipients', [])
183183
mailman_log('debug', ' Recipients: %s', recipients)
184184
if not recipients:
185-
mailman_log('error', 'No recipients found in msgdata for message %s', msgid)
185+
mailman_log('error', 'IncomingRunner: No recipients found in msgdata for message %s', msgid)
186186
mailman_log('error', ' Message data: %s', str(msgdata))
187187
mailman_log('error', ' To header: %s', msg.get('to', 'unknown'))
188188
mailman_log('error', ' Cc header: %s', msg.get('cc', 'unknown'))

Mailman/Queue/OutgoingRunner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ def _process_regular(self, mlist, msg, msgdata):
395395
recipient = addrs[0][1]
396396

397397
if not recipient:
398-
mailman_log('error', 'No recipients found in msgdata for message: %s', msgid)
398+
mailman_log('error', 'OutgoingRunner: No recipients found in msgdata for message: %s', msgid)
399399
return False
400400

401401
# Set the recipient in msgdata for future use

Mailman/Queue/Switchboard.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,9 +182,9 @@ def enqueue(self, msg, msgdata=None, listname=None, _plaintext=False, **kwargs):
182182
mailman_log('debug', 'Switchboard.enqueue: Set recipients from message headers for message: %s',
183183
msg.get('message-id', 'n/a'))
184184
else:
185-
mailman_log('error', 'Switchboard.enqueue: No recipients found in msgdata or message headers for message: %s',
185+
mailman_log('error', 'Switchboard: No recipients found in msgdata or message headers for message: %s',
186186
msg.get('message-id', 'n/a'))
187-
raise ValueError('No recipients found in msgdata or message headers')
187+
raise ValueError('Switchboard: No recipients found in msgdata or message headers')
188188

189189
# Generate a unique filebase
190190
filebase = self._make_filebase(msg, msgdata)

0 commit comments

Comments
 (0)