From 0da169ae61aec71aa6c883d916a84f89d749f57d Mon Sep 17 00:00:00 2001 From: "Piotr F. Mieszkowski" Date: Sat, 8 Apr 2023 20:57:31 +0200 Subject: [PATCH] Log exceptions from failover delivery --- gpg-mailgate.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gpg-mailgate.py b/gpg-mailgate.py index acf6a93..3c96373 100755 --- a/gpg-mailgate.py +++ b/gpg-mailgate.py @@ -64,4 +64,7 @@ if not delivered: # It seems we weren't able to deliver the message. In case it was some # silly message-encoding issue that shouldn't bounce the message, we just # try recoding the message body and delivering it. - core.failover_delivery(raw_message, to_addrs) + try: + core.failover_delivery(raw_message, to_addrs) + except: + LOG.exception('Failover delivery failed too')