Gnus development mailing list
 help / color / mirror / Atom feed
* ProtonMail Bridge Patch
@ 2024-02-17 17:29 Jakub Ječmínek
  2024-02-17 18:05 ` Eric Abrahamsen
  2024-10-11  8:22 ` Dilip
  0 siblings, 2 replies; 14+ messages in thread
From: Jakub Ječmínek @ 2024-02-17 17:29 UTC (permalink / raw)
  To: ding

Hello,
I'm not sure if this is the correct place to post this but I wish there
was this information somewhere like a week ago.

I recently switched my mail provider to ProtonMail which lets you use
IMAP/SMTP protocol only if you run something called ProtonMail Bridge on
your machine. This software basically acts as a local IMAP/SMTP server
and communicates with the upstream servers in a secured fashion (or at
least this is the rationale).

The problem is that Gnus and Gluon - IMAP server embedded inside
ProtonMail Bridge - doesn't work well together. Gnus (nnimap back end)
was acting like a lunatic and it took me a while before I found the real
reason for its behaviour.

Gnus expects that the messages are returned from a FETCH request in a
ascending (predictable?) order but Gluon responds each time
differently. Example communication might look like this:

Gnus: FETCH 1:3 ...
Gluon: * 3 RESPONSE ...
Gluon: * 1 RESPONSE ...
Gluon: * 2 RESPONSE ...

This is apparently a valid response according to RFC 3501. But luckily
for us there's server option inside Gluon which let's you disable
parallelism and ultimately fix message shuffling. Here's the patch for
proton-bridge package:

From 23f9c69a1552af1f946687f55de901488a2c9a38 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jakub=20Je=C4=8Dm=C3=ADnek?= <kuba@kubajecminek.cz>
Date: Fri, 16 Feb 2024 16:07:21 +0100
Subject: [PATCH] Gnus Fix: disable parallelism

---
 internal/services/imapsmtpserver/imap.go | 1 +
 1 file changed, 1 insertion(+)

diff --git a/internal/services/imapsmtpserver/imap.go b/internal/services/imapsmtpserver/imap.go
index 63888b51..358173c6 100644
--- a/internal/services/imapsmtpserver/imap.go
+++ b/internal/services/imapsmtpserver/imap.go
@@ -120,6 +120,7 @@ func newIMAPServer(
 		gluon.WithReporter(reporter),
 		gluon.WithUIDValidityGenerator(uidValidityGenerator),
 		gluon.WithPanicHandler(panicHandler),
+		gluon.WithDisableParallelism(),
 	)
 	if err != nil {
 		return nil, err
-- 
2.42.0

-- 
Kuba Ječmínek
<http://kubajecminek.cz>



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

end of thread, other threads:[~2024-10-11 14:43 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-17 17:29 ProtonMail Bridge Patch Jakub Ječmínek
2024-02-17 18:05 ` Eric Abrahamsen
2024-02-17 18:44   ` Jakub Ječmínek
2024-02-18 17:43     ` Eric Abrahamsen
2024-02-18 17:57       ` Jakub Ječmínek
2024-02-18 18:30         ` Eric Abrahamsen
2024-02-20 11:59           ` Jakub Ječmínek
2024-02-22 17:18             ` Eric Abrahamsen
2024-02-22 22:46               ` Jakub Ječmínek
2024-02-23  2:23                 ` Eric Abrahamsen
2024-02-23 11:57                   ` Jakub Ječmínek
2024-02-19 18:23         ` Bjørn Mork
2024-02-19 21:40           ` Eric Abrahamsen
2024-10-11  8:22 ` Dilip

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).