Skip to content

Commit 4ad69ba

Browse files
committed
update
1 parent b9b2639 commit 4ad69ba

3 files changed

Lines changed: 23 additions & 11 deletions

File tree

Mailman/Handlers/ToOutgoing.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
import traceback
2727
from Mailman.Logging.Syslog import mailman_log
2828

29-
3029
def process(mlist, msg, msgdata):
3130
"""Process the message by moving it to the outgoing queue."""
3231
msgid = msg.get('message-id', 'n/a')

Mailman/Queue/IncomingRunner.py

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -197,38 +197,40 @@ def _get_pipeline(self, mlist, msg, msgdata):
197197

198198
def _dopipeline(self, mlist, msg, msgdata, pipeline):
199199
msgid = msg.get('message-id', 'n/a')
200-
mailman_log('qrunner', 'IncomingRunner._dopipeline: Starting pipeline processing for message %s', msgid)
200+
mailman_log('debug', 'IncomingRunner._dopipeline: Starting pipeline processing for message %s', msgid)
201201

202202
# Validate pipeline state - use a more lenient check
203203
if not pipeline:
204-
mailman_log('qrunner', 'IncomingRunner._dopipeline: Empty pipeline for message %s', msgid)
204+
mailman_log('debug', 'IncomingRunner._dopipeline: Empty pipeline for message %s', msgid)
205205
return 0
206206

207207
# Deep copy the pipeline to prevent modifications
208208
current_pipeline = list(pipeline)
209209
if 'pipeline' in msgdata:
210210
stored_pipeline = list(msgdata['pipeline'])
211211
if set(current_pipeline) != set(stored_pipeline):
212-
mailman_log('qrunner', 'IncomingRunner._dopipeline: Pipeline mismatch for message %s. Current: %s, Stored: %s',
212+
mailman_log('debug', 'IncomingRunner._dopipeline: Pipeline mismatch for message %s. Current: %s, Stored: %s',
213213
msgid, str(current_pipeline), str(stored_pipeline))
214214
# Update the stored pipeline instead of failing
215215
msgdata['pipeline'] = current_pipeline
216216

217217
# Log message details for debugging
218-
mailman_log('qrunner', 'IncomingRunner._dopipeline: Message details for %s:', msgid)
219-
mailman_log('qrunner', ' From: %s', msg.get('from', 'unknown'))
220-
mailman_log('qrunner', ' To: %s', msg.get('to', 'unknown'))
221-
mailman_log('qrunner', ' Subject: %s', msg.get('subject', '(no subject)'))
222-
mailman_log('qrunner', ' Message type: %s', type(msg).__name__)
223-
mailman_log('qrunner', ' Message data: %s', str(msgdata))
218+
mailman_log('debug', 'IncomingRunner._dopipeline: Message details for %s:', msgid)
219+
mailman_log('debug', ' From: %s', msg.get('from', 'unknown'))
220+
mailman_log('debug', ' To: %s', msg.get('to', 'unknown'))
221+
mailman_log('debug', ' Subject: %s', msg.get('subject', '(no subject)'))
222+
mailman_log('debug', ' Message type: %s', type(msg).__name__)
223+
mailman_log('debug', ' Message data: %s', str(msgdata))
224224

225225
# Process through pipeline
226226
for handler in current_pipeline:
227227
try:
228+
mailman_log('debug', 'IncomingRunner._dopipeline: Processing message %s through handler %s', msgid, handler)
228229
modname = 'Mailman.Handlers.' + handler
229230
__import__(modname)
230231
process = getattr(sys.modules[modname], 'process')
231232
process(mlist, msg, msgdata)
233+
mailman_log('debug', 'IncomingRunner._dopipeline: Successfully processed message %s through handler %s', msgid, handler)
232234
except ImportError as e:
233235
mailman_log('error', 'Failed to import handler %s: %s', handler, str(e))
234236
return 0
@@ -239,6 +241,7 @@ def _dopipeline(self, mlist, msg, msgdata, pipeline):
239241
mailman_log('error', 'Handler %s failed: %s\n%s', handler, str(e), traceback.format_exc())
240242
return 0
241243

244+
mailman_log('debug', 'IncomingRunner._dopipeline: Successfully completed pipeline processing for message %s', msgid)
242245
return 1
243246

244247
def _cleanup(self):

Mailman/Queue/VirginRunner.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,19 @@ def _dispose(self, listname, msg, msgdata):
146146
msgdata['_fasttrack'] = 1
147147
mailman_log('debug', 'VirginRunner: Set _fasttrack flag for message %s', msgid)
148148

149+
# Get the pipeline and log it
150+
pipeline = self._get_pipeline(mlist, msg, msgdata)
151+
mailman_log('debug', 'VirginRunner: Pipeline for message %s: %s', msgid, pipeline)
152+
149153
# Process through the pipeline
150154
mailman_log('debug', 'VirginRunner: Starting pipeline processing for message %s', msgid)
151-
result = IncomingRunner._dispose(self, mlist, msg, msgdata)
155+
try:
156+
result = IncomingRunner._dispose(self, mlist, msg, msgdata)
157+
mailman_log('debug', 'VirginRunner: Pipeline processing completed for message %s with result: %s', msgid, result)
158+
except Exception as e:
159+
mailman_log('error', 'VirginRunner: Pipeline processing failed for message %s: %s', msgid, str(e))
160+
mailman_log('error', 'VirginRunner: Pipeline processing traceback:\n%s', traceback.format_exc())
161+
raise
152162

153163
# Log successful completion
154164
mailman_log('info', 'VirginRunner: Successfully processed virgin message %s (file: %s) for list %s',

0 commit comments

Comments
 (0)