Bug 472776

Summary: IMAP server status stuck to “server is unavailable“
Product: [Frameworks and Libraries] Akonadi Reporter: Sébastien P. <sebastien.picavet>
Component: IMAP resourceAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED NOT A BUG    
Severity: normal CC: carl, sebastien.picavet
Priority: NOR    
Version First Reported In: 5.23.2   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: mysql.err
akonadiserver.error

Description Sébastien P. 2023-07-29 16:38:21 UTC
Hi,

Since, upgrade of akonadi from 22.12.3 (do not know the client version) to 23.04.2 (“akonadictl --version” tells me 5.23.2), my IMAP resource on OVH is not working. On Kmail, I can see “Le serveur n’est pas disponible” (“Server is not available“).

I tried to remove it and recreate it => same issue
I tried another IMAP server on Gmail => working and I get my mails.

STEPS TO REPRODUCE
1. create IMAP resource with server he25.mail.ovh.net
2. put anything as user/password (it will not get to the server)
3. select SSL/993 port in advanced tab

OBSERVED RESULT
No connexion to the server.

EXPECTED RESULT
Connected to the server and get mails.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
KDE Plasma Version: 23.04.2
KDE Frameworks Version: 5.108.0
Qt Version: 5.15.10

ADDITIONAL INFORMATION
Same IMAP configuration is working on my smartphone for months/years.
I tried to lock at error logs. But did not see anything that looks revelant. Even there is a lot of mysql error.
Comment 1 Sébastien P. 2023-07-29 16:38:43 UTC
Created attachment 160606 [details]
mysql.err
Comment 2 Sébastien P. 2023-07-29 16:39:34 UTC
Created attachment 160607 [details]
akonadiserver.error
Comment 3 Sébastien P. 2023-08-02 19:59:07 UTC
I do remember today that I have another mail at another IMAP server from the same ISP. Same issue for me with he7.mail.ovh.net.
Comment 4 Sébastien P. 2023-08-02 20:21:34 UTC
Just saw this page: https://community.kde.org/PIM/Akonadi/Debug_IMAP

So:
> 0  2 août  22:04  imap.log.23509.1
> 0  2 août  22:04  imap.log.23509.2
> 0  2 août  22:05  imap.log.23509.3
> 0  2 août  22:05  imap.log.23509.4
=> Files are empty.

> org.kde.pim.kimap: Connection to server lost  QAbstractSocket::SocketError(13)
> org.kde.pim.akonadiserver: Cannot connect to agent instance with identifier 'akonadi_maildir_resource_0', error message: ''
=> Saw those two lines. First seems useful (network error?). Not sure the second is linked to this issue.

$ curl -iv he25.mail.ovh.net:993
*   Trying 5.135.57.20:993...
* Connected to he25.mail.ovh.net (5.135.57.20) port 993 (#0)
> GET / HTTP/1.1
> Host: he25.mail.ovh.net:993
> User-Agent: curl/8.0.1
> Accept: */*
> 
* Recv failure: Connexion ré-initialisée par le correspondant
* Closing connection 0
curl: (56) Recv failure: Connexion ré-initialisée par le correspondant
=> Network looks fine.
Comment 5 Sébastien P. 2023-10-15 14:10:32 UTC
Still the same issue with 5.23.3 / Akanodi 23.04.3 / Frameworks 5.110.0 / Qt 5.15.10
Also, I tried to create a new KDE user today. And reach the same issue.
Comment 6 Sébastien P. 2024-03-02 14:50:34 UTC
Same issue with new versions: 5.24.4 / Akanodi 23.08.3 / Frameworks 5.115.0 / Qt 5.15.12
Comment 7 Sébastien P. 2024-11-14 21:14:54 UTC
Also after Qt6 migration:
Framework 6.7.0
Qt 6.7.3
KDE 6.2.1
Kontact/akonadi 24.08.1
Comment 8 Sébastien P. 2025-08-19 19:28:30 UTC
Still the same issue. But after testing non secure connection, I find out that it works.

After checking, I noticed that:
$ openssl s_client -connect he25.mail.ovh.net:993 
Connecting to 5.135.57.20
CONNECTED(00000003)
805B7E92B57F0000:error:0A000102:SSL routines:ssl_choose_client_version:unsupported protocol:../openssl-3.4.1/ssl/statem/statem_lib.c:2359:
---
no peer certificate available
---
No client certificate CA names sent
---
SSL handshake has read 62 bytes and written 335 bytes
Verification: OK
---
New, (NONE), Cipher is (NONE)
Protocol: TLSv1.3
This TLS version forbids renegotiation.
Compression: NONE
Expansion: NONE
No ALPN negotiated
Early data was not sent
Verify return code: 0 (ok)
---

So bug is not on KDE.