From b46916fca9a835b13015e798758bdb13201dd07b Mon Sep 17 00:00:00 2001 From: Peter Bieringer Date: Wed, 24 Sep 2025 06:35:27 +0200 Subject: [PATCH 1/2] fix according to https://github.com/Kozea/Radicale/issues/1878#issue-3438629348 --- radicale/auth/dovecot.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/radicale/auth/dovecot.py b/radicale/auth/dovecot.py index 479f4111..bffed4ed 100644 --- a/radicale/auth/dovecot.py +++ b/radicale/auth/dovecot.py @@ -92,6 +92,7 @@ class Auth(auth.BaseAuth): # Hence, we try to read just once with a buffer big # enough to hold all of it. buf = sock.recv(1024) + version_sent = False while b'\n' in buf and not done: line, buf = buf.split(b'\n', 1) parts = line.split(b'\t') @@ -114,6 +115,10 @@ class Auth(auth.BaseAuth): ) return "" seen_part[0] += 1 + if int(version[1]) >= 3: + sock.send(b'VERSION\t1\t1\n') + buf += sock.recv(1024) + version_sent = True elif first == b'MECH': supported_mechs.append(parts[0]) seen_part[1] += 1 @@ -144,7 +149,8 @@ class Auth(auth.BaseAuth): # Handshake logger.debug("Sending auth handshake") - sock.send(b'VERSION\t1\t1\n') + if not version_sent: + sock.send(b'VERSION\t1\t1\n') sock.send(b'CPID\t%u\n' % os.getpid()) request_id = next(self.request_id_gen) From 8d224f976862012f60c485cdffb6117f8006af15 Mon Sep 17 00:00:00 2001 From: Peter Bieringer Date: Wed, 24 Sep 2025 06:35:48 +0200 Subject: [PATCH 2/2] changelog for https://github.com/Kozea/Radicale/issues/1878 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3b4ececa..a4ff0bf5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # Changelog ## 3.5.7.dev +* Extend: [auth] dovecot: add support for version >= 2.4 ## 3.5.6 * Fix: broken start when UID does not exist (potential container startup case)