>From 59d7930659f9c68cfa372de1fce95cd9c3495977 Mon Sep 17 00:00:00 2001
From: Amin Bandali <bandali@debian.org>
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

