From 91680e2e1750912af40f312de67011dadcca19c6 Mon Sep 17 00:00:00 2001 From: Jigme Datse Yli-Rasku Date: Thu, 30 May 2024 01:23:33 -0700 Subject: [PATCH] More loggging... This is logging that wasn't getting caught before. --- docs/courier-to-mailman3.md | 5 ++++- source/courier-to-mailman3.py | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/courier-to-mailman3.md b/docs/courier-to-mailman3.md index 76e11df..9f39076 100644 --- a/docs/courier-to-mailman3.md +++ b/docs/courier-to-mailman3.md @@ -44,4 +44,7 @@ This is our current version trying to communicate between courier and mailman3. * It's not finding it. * Oh man `To` vs `'To'` * Progress... But getting, "line too long" this seems like I need the - replace that I had before. \ No newline at end of file + replace that I had before. +* OK, that's progress... But not sure what, failing to get logs that are + useful. +* \ No newline at end of file diff --git a/source/courier-to-mailman3.py b/source/courier-to-mailman3.py index d7e61ae..b7631c2 100644 --- a/source/courier-to-mailman3.py +++ b/source/courier-to-mailman3.py @@ -64,6 +64,9 @@ try: content ) except smtplib.SMTPResponseException as e: + logger.error('lmtp error on send') + logger.exception('Got exception Traceback:') + logger.error('lmtp failed errorno: %s, message: %s', e.errno, e.strerror) if 400 <= e.smtp_code < 500: exit(111) # otherwise, it's either a 5xx aka permanent error or something else