Bug 435354

Summary: Sending SMTP mail doesn't work
Product: [Applications] kmailtransport Reporter: Jens <jens.uhlenbrock>
Component: generalAssignee: kdepim bugs <kdepim-bugs>
Status: REPORTED ---    
Severity: normal CC: gregor, jshand2013, petrblahamail, shadwman, uzivatel919
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:

Description Jens 2021-04-04 19:09:38 UTC
After updating my Opensuse system to Leap 15.2, kmail2 is no longer able to send emails through SMTP with popular webservices. I've checked the SMTP settings (auto-detect and as prescribed by the services) but it doesn't work. I've tried deinstalling kmailtransport and kmail2 and upgraded to the latest stable KDE version but nothing has resolved the issue so far.

The connection should be STARTTLS, but also the TLS alternative doesn't work.


STEPS TO REPRODUCE
1. Writing and sending mail in Kmail
2. Mail gets transferred to Outbox but nothing happens afterwards
3. For a long time nothing happens, then I get the error message "Failed to transport message. The remote host closed the connection "

OBSERVED RESULT
Mail cannot be sent

EXPECTED RESULT
Send email

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Opensuse Leap 15.2
KDE Plasma Version: 5.21.3
KDE Frameworks Version: 5.80.0
Qt Version: 5.15.2
kmailtransport 21.03.80

ADDITIONAL INFORMATION
Comment 1 Petr Bláha 2021-05-27 07:19:16 UTC
I have same (smiliar issue) on KDE Neon (with all updates).
Unsent mail in outbox are markes as:

- "Failed to transport message. The remote host closed the connection"
- or "Failed to transport message. Server error: 5.5.2 You are not welcome here."

Thunderbird is working as wxpected. Our company mail support said, that kmail is sending data before smtp handshake ("Server send data before got greetings")
Comment 2 Harry Sinclair 2021-07-27 16:20:40 UTC
I am experiencing the same issue on Ubuntu 21.04 with KMAIL 20.12.3. The SMTP commands never attempt to authenticate after the ELHO and STARTTLS commands. Here is the ksmtp log file output.

-------------------------------------

S: 220 mail2.domain.com ESMTP Postfix
C: EHLO pop-os.localnet
S: 250-mail2.domain.com
S: 250-PIPELINING
S: 250-SIZE 15728640
S: 250-ETRN
S: 250-STARTTLS
S: 250-ENHANCEDSTATUSCODES
S: 250-8BITMIME
S: 250-DSN
S: 250 SMTPUTF8
C: STARTTLS
S: 220 2.0.0 Ready to start TLS
C: EHLO pop-os.localnet
S: 250-mail2.domain.com
S: 250-PIPELINING
S: 250-SIZE 15728640
S: 250-ETRN
S: 250-AUTH PLAIN LOGIN
S: 250-ENHANCEDSTATUSCODES
S: 250-8BITMIME
S: 250-DSN
S: 250 SMTPUTF8
Comment 3 uzivatel919 2022-03-27 16:16:29 UTC
Same here for KDE Frameworks Version: 5.76.0 | Qt Version: 5.12.7 | KMail Version 5.14.2 (20.04.2) | The xcb windowing system.
Comment 4 Gregor 2022-10-04 07:10:43 UTC
Same here, Arch KDE, currently on kmail 22.08-1-1, but this has been happening for a while now with GMail's SMTP. The funny thing is that sometimes it works, sometimes it doesn't. Sending from Thunderbird always works.
Comment 5 jshand2013 2022-11-13 08:11:26 UTC
(In reply to Gregor from comment #4)
> Same here, Arch KDE, currently on kmail 22.08-1-1, but this has been
> happening for a while now with GMail's SMTP. The funny thing is that
> sometimes it works, sometimes it doesn't. Sending from Thunderbird always
> works.

i am finding this is true as well.  such an annoying bug