public inbox for [email protected]  
help / color / mirror / Atom feed
From: Célestin Matte <[email protected]>
To: PostgreSQL WWW <[email protected]>
Subject: [PATCH] pglister: Bugfix: crashes for should-not-happen case
Date: Tue, 19 Aug 2025 20:11:19 +0200
Message-ID: <[email protected]> (raw)

Attached: patch for 2 crashes on this corner (should-not-happen) case.

I still get this case because spammers occasionally still write directly to test-list-owner+archive@<domain>

The exim filters I set up are pretty hacky ([1]), if you have better ones that prevent this case, I'd be up for it

[1]: https://gitlab.com/cmatte/ansible-pglister/-/commit/351eac80a349c472ea34fab2ecb2fefd83ef8fb4
-- 
Célestin Matte


Attachments:

  [text/x-patch] 0001-Bugfix-crashes-for-should-not-happend-case.patch (1.2K, 2-0001-Bugfix-crashes-for-should-not-happend-case.patch)
  download | inline diff:
From ec89f232b37a3bef573ffccbc904a5e926e77221 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?C=C3=A9lestin=20Matte?= <[email protected]>
Date: Sat, 16 Aug 2025 16:59:17 +0200
Subject: [PATCH] Bugfix: crashes for should-not-happen case

---
 lib/handlers/bouncehandler.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/handlers/bouncehandler.py b/lib/handlers/bouncehandler.py
index 9b282d2..ced571c 100644
--- a/lib/handlers/bouncehandler.py
+++ b/lib/handlers/bouncehandler.py
@@ -7,6 +7,7 @@ from mailutil.header import decode_mime_header
 from mailutil.body import get_truncated_body
 from baselib.misc import log
 from baselib.config import config
+from baselib.template import send_mailtemplate
 
 archives_bounce_re = re.compile(r'^(.*)-owner\+archive@(.*)$', re.I)
 regular_bounce_re = re.compile(r'^(.*)-owner\+M(\d+)-(\d+)@(.*)$', re.I)
@@ -227,7 +228,7 @@ class BounceHandler(object):
         # This is a Should Never Happen (TM) thing, so just fire off an email to the list owner as quickly
         # as possible.
         send_mailtemplate(
-            curs,
+            self.curs,
             config.get('bounces', 'senderaddr'),
             config.get('bounces', 'sendername'),
             config.get('notify', 'address'),
-- 
2.50.1



reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: [PATCH] pglister: Bugfix: crashes for should-not-happen case
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox