From 32855f2472a11c04268c9ae04e90cf06d93f8b67 Mon Sep 17 00:00:00 2001 From: s3lph Date: Tue, 17 Oct 2023 22:08:09 +0200 Subject: [PATCH] fix(smtpd): Log errors to stdout rather than SMTP session --- CHANGELOG.md | 13 +++++++++++++ easywks/__init__.py | 2 +- easywks/lmtpd.py | 6 +++--- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6dccac0..dd50ba3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # EasyWKS Changelog + +## Version 0.4.4 + +smtpd: Log errors to stdout rather than SMTP session + +### Changes + + +- smtpd: Log errors to stdout rather than SMTP session + + + + ## Version 0.4.3 diff --git a/easywks/__init__.py b/easywks/__init__.py index 6a88845..64d60f8 100644 --- a/easywks/__init__.py +++ b/easywks/__init__.py @@ -1,2 +1,2 @@ -__version__ = '0.4.3' +__version__ = '0.4.4' diff --git a/easywks/lmtpd.py b/easywks/lmtpd.py index d9456d3..b02f549 100644 --- a/easywks/lmtpd.py +++ b/easywks/lmtpd.py @@ -19,9 +19,9 @@ class LmtpMailServer: process_mail(message) except EasyWksError as e: return f'550 {e}' - except BaseException: - tb = traceback.format_exc() - return f'550 Error during message processing: {tb}' + except Exception as e: + traceback.print_exc() + return f'550 Error during message processing: {e}' return '250 Message successfully handled'