🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.debian.bugs.dist
Article #6322

Bug#1155451: Connection error after configuring account

#6322
From: Amin Bandali
Date: Thu, 26 Nov 2026 16:30
67 lines
3625 bytes
--=-=-=
Content-Type: text/plain

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 "foo@example.org",
    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


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=0001-Fix-Connection-error-after-account-setup.patch

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


--=-=-=--
Technical Details
Message-ID: <O3Kw9-einr-1@gated-at.bofh.it>
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.corradoroberto.it!bofh.it!news.nic.it!robomod

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.corradoroberto.it!bofh.it!news.nic.it!robomod
From: Amin Bandali <bandali@debian.org>
Newsgroups: linux.debian.bugs.dist
Subject: Bug#1155451: Connection error after configuring account
Date: Thu, 26 Nov 2026 17:30:01 +0100
Message-ID: <O3Kw9-einr-1@gated-at.bofh.it>
X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org  Thu Nov 26 16:25:09 2026
Old-Return-Path: <debbugs@buxtehude.debian.org>
X-Spam-Flag: NO
X-Spam-Score: -1.7
Reply-To: Amin Bandali <bandali@debian.org>, 1155451@bugs.debian.org
Resent-To: debian-bugs-dist@lists.debian.org
Resent-Cc: pkg-ayatana-devel@lists.alioth.debian.org
X-Debian-Pr-Message: report 1155451
X-Debian-Pr-Package: ayatana-webmail
X-Debian-Pr-Keywords: patch
X-Debian-Pr-Source: ayatana-webmail
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Debian-User: bandali
X-Debian-Message: from BTS
X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/2005233
List-ID: <debian-bugs-dist.lists.debian.org>
List-URL: <https://lists.debian.org/debian-bugs-dist/>
Approved: robomod@news.nic.it
Lines: 67
Organization: linux.* mail to news gateway
Sender: robomod@news.nic.it
X-Original-Date: Thu, 26 Nov 2026 11:23:46 -0500
X-Original-Message-ID: <875wxj1rzh.fsf@debian.org>