From 7ec334a716ad70d0270ffd9231819b55d0ded191 Mon Sep 17 00:00:00 2001 From: Jigme Datse Yli-Rasku Date: Wed, 29 May 2024 23:31:22 -0700 Subject: [PATCH] Logging error on lmtp not created. This I hope logs when lmtp fails to be created. --- docs/courier-to-mailman3.md | 3 ++- source/courier-to-mailman3.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/courier-to-mailman3.md b/docs/courier-to-mailman3.md index 13959a6..819ed27 100644 --- a/docs/courier-to-mailman3.md +++ b/docs/courier-to-mailman3.md @@ -28,4 +28,5 @@ This is our current version trying to communicate between courier and mailman3. * Format had errors with `$` used instead of `%` * Clean up logging to not log what was logged for logging diagnostics. * Logging host and port on same line. -* OK, parsing port number, and setting default. \ No newline at end of file +* OK, parsing port number, and setting default. +* Logging error (I hope), when lmtp fails to be created. \ No newline at end of file diff --git a/source/courier-to-mailman3.py b/source/courier-to-mailman3.py index 5ec8a94..c0621b5 100644 --- a/source/courier-to-mailman3.py +++ b/source/courier-to-mailman3.py @@ -65,5 +65,6 @@ try: # 5xx error else: raise -except: +except smtplib.SMTPEXception as e: + logger.error('lmtp failed errorno: %s, message: %s', e.errno, e.strerror) exit(100) \ No newline at end of file