Bug 446751 - Akonadi POP3 Resource failed to connect to pop3 gmail
Summary: Akonadi POP3 Resource failed to connect to pop3 gmail
Status: RESOLVED FIXED
Alias: None
Product: Akonadi
Classification: Frameworks and Libraries
Component: POP3 Resource (show other bugs)
Version: 5.19.0
Platform: openSUSE Linux
: NOR major
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
: 446949 446972 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-12-09 20:22 UTC by Olivier BELLEUX
Modified: 2021-12-15 21:37 UTC (History)
5 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 Olivier BELLEUX 2021-12-09 20:22:50 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***


STEPS TO REPRODUCE
1. connect to kontact / kmail
2. pick up the mail
3. 

OBSERVED RESULT

Unable to login to the server "pop.gmail.com".
Could not login to pop.gmail.com.
The server terminated the connection immediately. 

org.kde.pim.pop3resource: ============== ERROR DURING POP3 SYNC ==========================
org.kde.pim.pop3resource: "Unable to login to the server \"pop.gmail.com\".\nCould not login to pop.gmail.com.\n\nThe server terminated the connectionimmediately."
org.kde.pim.pop3resource: UID list from server is not valid.
org.kde.pim.pop3resource: ============== ERROR DURING POP3 SYNC ==========================
org.kde.pim.pop3resource: "Unable to login to the server \"pop.gmail.com\".\nCould not login to pop.gmail.com.\n\nThe server terminated the connectionimmediately."

EXPECTED RESULT

emails are raised, of course…

SOFTWARE/OS VERSIONS

Operating System: openSUSE Leap 15.3
KDE Plasma Version: 5.23.4
KDE Frameworks Version: 5.88.0
Qt Version: 5.15.2
Kernel Version: 5.3.18-59.37-default (64-bit)
Graphics Platform: X11
Processors: 12 × Intel® Core™ i7-8750H CPU @ 2.20GHz
Memory: 7.6 Gio of RAM
Graphics Processor: Mesa DRI Intel® UHD Graphics 630
Comment 1 leo_rockway 2021-12-10 19:20:57 UTC
I confirm I'm seeing this same issue.
Artix. KMail 5.19.0.
Comment 2 Albert Astals Cid 2021-12-10 20:54:03 UTC
Any SSL/TSL POP3 is broken
Comment 3 Bug Janitor Service 2021-12-10 20:57:43 UTC
A possibly relevant merge request was started @ https://invent.kde.org/pim/kdepim-runtime/-/merge_requests/63
Comment 4 Albert Astals Cid 2021-12-12 11:35:51 UTC
Git commit f14fabcefb45790175e209ef8ae394def4a805e9 by Albert Astals Cid.
Committed on 11/12/2021 at 23:55.
Pushed by dfaure into branch 'release/21.12'.

POP3: Fix SSL connections

We need to go into ssl before trying to read from the socket, otherwise
nothing works

M  +43   -29   resources/pop3/pop3protocol.cpp
M  +2    -0    resources/pop3/pop3protocol.h

https://invent.kde.org/pim/kdepim-runtime/commit/f14fabcefb45790175e209ef8ae394def4a805e9
Comment 5 Ricardo J. Barberis 2021-12-14 15:30:26 UTC
(In reply to Albert Astals Cid from comment #2)
> Any SSL/TSL POP3 is broken

Other POP3 servers were working fine for me (courier and dovecot POP3 servers).

After this fix only Gmail POP3 works, kmail/akonadi can't connect to the others
Comment 6 Ricardo J. Barberis 2021-12-14 15:39:25 UTC
Sorry for my incomplete previous comment.

How/Where can I see some (debug) logs to see if this is actually the problem?

I don't see anything relevant in ~/.local/share/akonadi/Akonadi.error or ~/.local/share/sddm/xorg-session.log

kmail2 5.19.0 (21.12.0)
akonadictl 5.19.0 (21.12.0)

Operating System: Slackware 15.0 (RC2)
KDE Plasma Version: 5.23.4
KDE Frameworks Version: 5.89.0
Qt Version: 5.15.3
Kernel Version: 5.15.7 (64-bit)
Graphics Platform: X11
Processors: 8 × Intel® Core™ i5-1035G1 CPU @ 1.00GHz
Memory: 15.2 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics
Comment 7 Ricardo J. Barberis 2021-12-14 15:52:31 UTC
I did a few more tests and I can't connect with TLS, STARTTLS or without TLS.

I can provide email accounts on both servers if you need them for testing.
Comment 8 Albert Astals Cid 2021-12-14 16:01:08 UTC
(In reply to Ricardo J. Barberis from comment #7)
> I did a few more tests and I can't connect with TLS, STARTTLS or without TLS.

Note that changing between TLS and STARTTLS is a bit broken at the moment so you'll need to "akonadictl restart" when changing those in the UI (yeah not ideal)

> I can provide email accounts on both servers if you need them for testing.

Yes, please.
Comment 9 Ricardo J. Barberis 2021-12-14 16:59:51 UTC
(In reply to Albert Astals Cid from comment #8)
> (In reply to Ricardo J. Barberis from comment #7)
> > I did a few more tests and I can't connect with TLS, STARTTLS or without TLS.
> 
> Note that changing between TLS and STARTTLS is a bit broken at the moment so
> you'll need to "akonadictl restart" when changing those in the UI (yeah not
> ideal)

Oh! OK, I changed my accounts from STARTTLS to SSL/TLS, restarted akonadi and the connections worked!

> > I can provide email accounts on both servers if you need them for testing.
> 
> Yes, please.

Good. Should I send the credentials via email to you?
Comment 10 Nick 2021-12-14 22:36:04 UTC
I'm also seeing this same problem since upgrade to kmail Version 5.19.0 (21.12.0) KDE Neon 5.23.4: Unable to receive pop3 email

org.kde.pim.pop3resource: ============== ERROR DURING POP3 SYNC ==========================
org.kde.pim.pop3resource: "Unable to login to the server \"pop.gmail.com\".\nCould not login to pop.gmail.com.\n\nThe server terminated the connection immediately."
org.kde.pim.pop3resource: UID list from server is not valid.
"org.freedesktop.DBus.Error.NoReply" "Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken."
"org.freedesktop.DBus.Error.NoReply" "Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken."
"org.freedesktop.DBus.Error.NoReply" "Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken."
"org.freedesktop.DBus.Error.NoReply" "Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken."
"org.freedesktop.DBus.Error.NoReply" "Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken."
"org.freedesktop.DBus.Error.NoReply" "Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken."
org.kde.pim.pop3resource: ============== ERROR DURING POP3 SYNC ==========================
org.kde.pim.pop3resource: "Unable to login to the server \"pop.gmail.com\".\nCould not login to pop.gmail.com.\n\nThe server terminated the connection immediately."
org.kde.pim.pop3resource: UID list from server is not valid.
"org.freedesktop.DBus.Error.NoReply" "Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken."
"org.freedesktop.DBus.Error.NoReply" "Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken."
Comment 11 Nick 2021-12-14 22:48:11 UTC
This issue is also being duplicated here:
https://bugs.kde.org/show_bug.cgi?id=446751
https://bugs.kde.org/show_bug.cgi?id=446972
Comment 12 Nicolas Fella 2021-12-14 23:21:23 UTC
*** Bug 446972 has been marked as a duplicate of this bug. ***
Comment 13 Nicolas Fella 2021-12-14 23:23:09 UTC
*** Bug 446949 has been marked as a duplicate of this bug. ***
Comment 14 Albert Astals Cid 2021-12-14 23:48:32 UTC
(In reply to Nick from comment #10)
> I'm also seeing this same problem since upgrade to kmail Version 5.19.0
> (21.12.0) KDE Neon 5.23.4: Unable to receive pop3 email

Tell the neon people to apply the patch that fixes this.
Comment 15 Albert Astals Cid 2021-12-14 23:51:30 UTC
(In reply to Ricardo J. Barberis from comment #9)
> (In reply to Albert Astals Cid from comment #8)
> > (In reply to Ricardo J. Barberis from comment #7)
> > > I did a few more tests and I can't connect with TLS, STARTTLS or without TLS.
> > 
> > Note that changing between TLS and STARTTLS is a bit broken at the moment so
> > you'll need to "akonadictl restart" when changing those in the UI (yeah not
> > ideal)
> 
> Oh! OK, I changed my accounts from STARTTLS to SSL/TLS, restarted akonadi
> and the connections worked!
> 
> > > I can provide email accounts on both servers if you need them for testing.
> > 
> > Yes, please.
> 
> Good. Should I send the credentials via email to you?

Unless you have access to an account that doesn't work, no.

I'll close this, since you say that the connection works (with the patch), we can track the configuration problem at https://bugs.kde.org/show_bug.cgi?id=447005
Comment 16 Ricardo J. Barberis 2021-12-15 01:16:50 UTC
(In reply to Albert Astals Cid from comment #15)
> (In reply to Ricardo J. Barberis from comment #9)
> > Good. Should I send the credentials via email to you?
> 
> Unless you have access to an account that doesn't work, no.
> 
> I'll close this, since you say that the connection works (with the patch),
> we can track the configuration problem at
> https://bugs.kde.org/show_bug.cgi?id=447005

To clarify: the connection works in SSL/TLS mode but if I go back to STARTTLS and restart akonadi it fails again with the same error message (sorry it's in Spanish but I guess you'll understand it :-) ):

org.kde.pim.pop3resource: ============== ERROR DURING POP3 SYNC ==========================
org.kde.pim.pop3resource: "No es posible iniciar sesión en el servidor «palmtx.ferozo.com».\nNo se ha podido iniciar sesión en palmtx.ferozo.com.\n\nEl servidor ha terminado la conexión de forma inmediata."
org.kde.pim.pop3resource: UID list from server is not valid.

So, switching to SSL/TLS is just a workaround.
(Let me know how to send you access to a test email account if needed).

I'll follow the other bug report too, thanks!
Comment 17 Olivier BELLEUX 2021-12-15 12:15:36 UTC
Hello,

I'm using opensuse leap 15.3 with kde community repositories; unfortunately the openbuildservice had some problems to rebuild kde gear 21.12: it just finished after three days of hard works.

I did the update + logout + login and launch kontact ; I retrieved my mails ; everything went well so for me the bug is solved

Thanks to all the kdepim team for the patch.

Sincerely
Comment 18 Ricardo J. Barberis 2021-12-15 15:42:36 UTC
Apparently Slackware hasn't included this patch yet (), so let's wait and see if my issue is fixed after Patrick includes it.

https://www.linuxquestions.org/questions/slackware-14/requests-for-current-14-2-15-0-a-4175620463/page617.html#post6309639

Sorry for the noise :/
Comment 19 Nick 2021-12-15 21:37:44 UTC
KDE Neon updated with latest patch, receiving pop3 email without problem.