Bug 392138 - First SMTP authentication fails for almost every emails
Summary: First SMTP authentication fails for almost every emails
Status: REPORTED
Alias: None
Product: kmailtransport
Classification: Applications
Component: general (show other bugs)
Version: 5.7.2
Platform: Archlinux Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-21 15:01 UTC by Thomas Monjalon
Modified: 2018-04-04 12:51 UTC (History)
0 users

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 Thomas Monjalon 2018-03-21 15:01:38 UTC
Hi,

I am using KMail 5.7.3 in ArchLinux.
Since recently (not sure about the version number), I have some delay when sending emails.

I tried enabling logs with
kdebugsettings
export KSMTP_SESSION_LOG=/tmp/smtp.log
akonadictl restart


Most of the time, the first send attempt fails:

journalctl:
akonadi_maildispatcher_agent[21670]: org.kde.pim.mailtransport.smtpplugin: Login started
akonadi_maildispatcher_agent[21670]: org.kde.pim.ksmtp: TLS negotiation done.
akonadi_maildispatcher_agent[21670]: qt.network.ssl: QSslSocket::startClientEncryption: cannot start handshake on non-plain connection
akonadi_maildispatcher_agent[21670]: qt.network.ssl: QSslSocket::startClientEncryption: cannot start handshake on non-plain connection
akonadi_maildispatcher_agent[21670]: org.kde.pim.ksmtp: Socket disconnected
akonadi_maildispatcher_agent[21670]: org.kde.pim.mailtransport.smtpplugin: Removing session KSmtp::Session(0x55e5c5d67ca0) from the pool
akonadi_maildispatcher_agent[21670]: org.kde.pim.ksmtp: Socket disconnected

Session log:
C: EHLO xps.localnet
S: 220 smtp.fastmail.com ESMTP ready
S: 220 smtp.fastmail.com ESMTP ready

Notification:
E-Mail Sending Failed
Failed to transport messaged. Connection to server lost.


Then there is an automatic second attempt which works:

journalctl:
akonadi_maildispatcher_agent[21670]: org.kde.pim.mailtransport.smtpplugin: Login started
akonadi_maildispatcher_agent[21670]: org.kde.pim.ksmtp: TLS negotiation done.
akonadi_maildispatcher_agent[21670]: qt.network.ssl: QSslSocket::startClientEncryption: cannot start handshake on non-plain connection
akonadi_maildispatcher_agent[21670]: org.kde.pim.ksmtp: Trying authmod "PLAIN"
akonadi_maildispatcher_agent[21670]: org.kde.pim.ksmtp: SASL_INTERACT Id 16385
akonadi_maildispatcher_agent[21670]: org.kde.pim.ksmtp: SASL_INTERACT Id 16386
akonadi_maildispatcher_agent[21670]: org.kde.pim.ksmtp: SASL_CB_[USER|AUTHNAME]: ' "john@doe.net" '
akonadi_maildispatcher_agent[21670]: org.kde.pim.ksmtp: SASL_INTERACT Id 16388
akonadi_maildispatcher_agent[21670]: org.kde.pim.ksmtp: SASL_CB_PASS: [hidden]
akonadi_maildispatcher_agent[21670]: org.kde.pim.ksmtp: Trying authmod "PLAIN"
akonadi_maildispatcher_agent[21670]: org.kde.pim.mailtransport.smtpplugin: Send started

Session log:
C: EHLO xps.localnet
S: 220 smtp.fastmail.com ESMTP ready
S: 250-smtp.fastmail.com
S: 250-PIPELINING
...
Comment 1 Thomas Monjalon 2018-04-04 12:51:58 UTC
There is a workaround: use STARTTLS.