public inbox for [email protected]  
help / color / mirror / Atom feed
[PATCH] pglister: Bugfix: crashes for should-not-happen case
2+ messages / 2 participants
[nested] [flat]

* [PATCH] pglister: Bugfix: crashes for should-not-happen case
@ 2025-08-19 18:11 Célestin Matte <[email protected]>
  2025-08-20 13:34 ` Re: [PATCH] pglister: Bugfix: crashes for should-not-happen case Magnus Hagander <[email protected]>
  0 siblings, 1 reply; 2+ messages in thread

From: Célestin Matte @ 2025-08-19 18:11 UTC (permalink / raw)
  To: PostgreSQL WWW <[email protected]>

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



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: [PATCH] pglister: Bugfix: crashes for should-not-happen case
  2025-08-19 18:11 [PATCH] pglister: Bugfix: crashes for should-not-happen case Célestin Matte <[email protected]>
@ 2025-08-20 13:34 ` Magnus Hagander <[email protected]>
  0 siblings, 0 replies; 2+ messages in thread

From: Magnus Hagander @ 2025-08-20 13:34 UTC (permalink / raw)
  To: Célestin Matte <[email protected]>; +Cc: PostgreSQL WWW <[email protected]>

On Tue, Aug 19, 2025 at 8:11 PM Célestin Matte <[email protected]>
wrote:

> 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
>

Indeed, that's definitely an old oops that's been there for many years.

Patch applied, thanks!

//Magnus


^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2025-08-20 13:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-08-19 18:11 [PATCH] pglister: Bugfix: crashes for should-not-happen case Célestin Matte <[email protected]>
2025-08-20 13:34 ` Magnus Hagander <[email protected]>

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