Bug 339561 - Imap resource uses multiple connections which causes problems with uw-imapd
Summary: Imap resource uses multiple connections which causes problems with uw-imapd
Status: RESOLVED UNMAINTAINED
Alias: None
Product: Akonadi
Classification: Frameworks and Libraries
Component: IMAP resource (show other bugs)
Version: 1.13.0
Platform: Debian testing Linux
: NOR minor
Target Milestone: ---
Assignee: Christian Mollekopf
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-01 07:56 UTC by Jan Hudec
Modified: 2017-01-07 21:48 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Hudec 2014-10-01 07:56:48 UTC
I have mail on server which has crappy old uw-imapd. It works mostly fine as long as only one connection is made, but when multiple connections are opened, they tend to end with

    S: * BYE Killed ( lost mailbox lock )

and the operations requested are _not_ carried out.

Kmail up to 4.4 worked OK, but since the switch to Akonadi it always creates one persistent connection and _another_ connection when it synchronizes. The result is that status flags don't get written back and deleted mail reappears after next synchronization.

The server exhibits this problem whenever I connect any two IMAP clients at once, but with Aconadi it exhibits it even when only one is connected, apparently because of the two concurrent connections.



Reproducible: Always

Steps to Reproduce:
The multiple connections should be readily observable. Just list connections (e.g. with netstat) while kmail is doing synchronization.

The behaviour with uw-imapd requires an uw-imapd server serving from mbox (spool is by default mbox, so e.g. with INBOX serving /var/mail/$USER directly) with non-trivial amount of mail. Then try marking some mail as read, deleted etc.

Actual Results:  
Multiple connections to the server exist.

With uw-imapd server with mbox mailbox changes mail reverts to previous state on next synchronization. When logging is enabled (via KIMAP_LOGFILE environment), many logs are created, most of them ending with

    S: * BYE Killed ( lost mailbox lock )

Expected Results:  
Only one connection exists.

uw-imapd works as long as not used by multiple clients at the same time.

The problem is really that uw-imapd is crap when serving mail from mbox files. A workaround would be to switch to mbx files (I have shell access, I can convert my mailboxes), but that would cause problems when the server gets eventually switched to anything more sensible as dovecot doesn't support mbx (and uw-imapd does not support maildir) and somewhat complicated as procmail does not support it either. The other workaround is to create mirror with offlineimap (I've already tried, it works, but uses a lot of memory) or isync.

I am marking this minor, because it appears to only cause problems to uw-imap, which has been discontinued from Debian since ages and it's not clear whether it is even supported upstream any more. IMAP is supposed to handle multiple connections. Still it seems to me one connections should be sufficient and clients that don't make multiple connection seem to work just fine with that server.
Comment 1 Denis Kurz 2016-09-24 20:36:59 UTC
This bug has only been reported for versions older than KDEPIM 4.14 (at most akonadi-1.3). Can anyone tell if this bug still present?

If noone confirms this bug for a recent version of akonadi (part of KDE Applications 15.08 or later), it gets closed in about three months.
Comment 2 Denis Kurz 2017-01-07 21:48:13 UTC
Just as announced in my last comment, I close this bug. If you encounter it again in a recent version (at least 5.0 aka 15.08), please open a new one unless it already exists. Thank you for all your input.