Package: ayatana-webmail
Severity: important
Tags: patch

After a fresh install of ayatana-webmail and configuring an account,
a 'Connection error' notification like the following is displayed and
the application exits:

    Unable to connect to account "[email protected]",
    the application will now exit.

Debugging this, it turned out to be a side-effect of the packaging
patch for using Debian's python3-imaplib2 rather than the package's
vendored version of it: the system package (and indeed the upstream
imaplib2) does not have a LOGOUT symbol, and application.py's
Connection.isOpen() method's attempts to use imaplib.LOGOUT triggers
an exception that results in the application exiting.

The fix is simple: replace imaplib.LOGOUT with 'LOGOUT' directly.
The attached patch against the packaging repo applies this fix.

Best,
amin

>From 59d7930659f9c68cfa372de1fce95cd9c3495977 Mon Sep 17 00:00:00 2001
From: Amin Bandali <[email protected]>
Date: Thu, 26 Nov 2026 11:10:14 -0500
Subject: [PATCH] Fix 'Connection error' after account setup

---
 debian/patches/2001_use-Debians-imaplib2-module.patch | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/debian/patches/2001_use-Debians-imaplib2-module.patch b/debian/patches/2001_use-Debians-imaplib2-module.patch
index 78211c5..2485f29 100644
--- a/debian/patches/2001_use-Debians-imaplib2-module.patch
+++ b/debian/patches/2001_use-Debians-imaplib2-module.patch
@@ -13,6 +13,15 @@ Forwarded: https://github.com/AyatanaIndicators/ayatana-webmail/issues/14
  import os.path
  import os
  import urllib3
+@@ -448,7 +448,7 @@
+ 
+     def isOpen(self):
+ 
+-        return checkNetwork() and self.oImap and self.oImap.state != imaplib.LOGOUT and not self.oImap.Terminate
++        return checkNetwork() and self.oImap and self.oImap.state != 'LOGOUT' and not self.oImap.Terminate
+ 
+ class Message(object):
+ 
 --- a/ayatanawebmail/dialog.py
 +++ b/ayatanawebmail/dialog.py
 @@ -5,7 +5,7 @@
-- 
2.47.3

Reply via email to