Skip to content

Commit 8a1c5f5

Browse files
committed
update
1 parent 646fe3a commit 8a1c5f5

4 files changed

Lines changed: 19 additions & 2 deletions

File tree

Mailman/Handlers/SMTPDirect.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,9 +188,11 @@ def process(mlist, msg, msgdata):
188188
' To: %s\n'
189189
' Cc: %s\n'
190190
' List: %s\n'
191-
' Pipeline: %s',
191+
' Pipeline: %s\n'
192+
' Full msgdata: %s',
192193
msgid, sender, subject, to, cc, mlist.internal_name(),
193-
msgdata.get('pipeline', 'No pipeline'))
194+
msgdata.get('pipeline', 'No pipeline'),
195+
str(msgdata))
194196
return
195197

196198
# Check for spam headers first

Mailman/Handlers/ToOutgoing.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@ def process(mlist, msg, msgdata):
7474
# Ensure recipients are preserved in msgdata
7575
msgdata['recips'] = recips
7676
msgdata['recipient'] = recips[0] if recips else None
77+
78+
# Log the full msgdata before enqueueing
79+
mailman_log('debug', 'ToOutgoing: Full msgdata before enqueue:\n%s', str(msgdata))
80+
7781
outgoingq.enqueue(msg, msgdata,
7882
listname=mlist.internal_name())
7983
mailman_log('info', 'ToOutgoing: Successfully queued message %s for list %s',

Mailman/Queue/OutgoingRunner.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,9 @@ def _dispose(self, mlist, msg, msgdata):
245245
msgid = msg.get('message-id', 'n/a')
246246
filebase = msgdata.get('_filebase', 'unknown')
247247

248+
# Log the full msgdata at the start of processing
249+
mailman_log('debug', 'OutgoingRunner._dispose: Full msgdata at start:\n%s', str(msgdata))
250+
248251
# Ensure we have a MailList object
249252
if isinstance(mlist, str):
250253
try:
@@ -288,6 +291,9 @@ def _dispose(self, mlist, msg, msgdata):
288291
self._unmark_message_processed(msgid)
289292
return False
290293

294+
# Log the full msgdata after validation
295+
mailman_log('debug', 'OutgoingRunner._dispose: Full msgdata after validation:\n%s', str(msgdata))
296+
291297
# Validate message headers
292298
if not msg.get('message-id'):
293299
mailman_log('error', 'OutgoingRunner._dispose: Message missing Message-ID header')

Mailman/Queue/Switchboard.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,9 @@ def enqueue(self, msg, msgdata=None, listname=None, _plaintext=False, **kwargs):
113113

114114
# Store any additional keyword arguments in msgdata
115115
msgdata.update(kwargs)
116+
117+
# Log the full msgdata before processing
118+
mailman_log('debug', 'Switchboard.enqueue: Full msgdata before processing:\n%s', str(msgdata))
116119

117120
# Convert string message to Message object if needed
118121
if isinstance(msg, str):
@@ -244,6 +247,8 @@ def dequeue(self, filebase):
244247
# Read the message and metadata
245248
try:
246249
msg, data = self._dequeue(filename)
250+
# Log the full msgdata after dequeuing
251+
mailman_log('debug', 'Switchboard.dequeue: Full msgdata after dequeuing:\n%s', str(data))
247252
except Exception as e:
248253
mailman_log('error', 'Switchboard.dequeue: Failed to read message from %s: %s', filebase, str(e))
249254
raise

0 commit comments

Comments
 (0)