Bug 341681 - Failure to transport message, must issue a STARTTLS command first. [Frameworks branch]
Summary: Failure to transport message, must issue a STARTTLS command first. [Framework...
Status: RESOLVED FIXED
Alias: None
Product: kdepimlibs
Classification: Applications
Component: mailtransport (show other bugs)
Version: GIT (master)
Platform: Compiled Sources Linux
: NOR major
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-08 23:03 UTC by Dan O.
Modified: 2014-12-09 12:05 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Setting the encryption option (64.95 KB, image/png)
2014-12-08 23:10 UTC, Dan O.
Details
Radio buttons cleared when the settings are reopened (60.26 KB, image/png)
2014-12-08 23:11 UTC, Dan O.
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dan O. 2014-12-08 23:03:52 UTC
Trying to send any email using any server that requires authentication fails immediately. Testing on my own server, port 25 works fine, as it doesn't require STARTTLS from localhost clients. When I switch to port 587 it fails, the TCP stack is as follows:

220 mail.redchops.com ESMTP Postfix
EHLO equinox.localnet
250-mail.redchops.com
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
AUTH PLAIN ************************ [base64 password removed, but it is correct]
530 5.7.0 Must issue a STARTTLS command first

In the SMTP settings, the radio buttons for setting encryption doesn't seem to do anything. If I set one, close the window then reopen it, all the radio icons are cleared. That seems to me that it's not actually setting the encryption level in some config file but I can't find where this setting saves to. Even if I create a GMail account with the account wizard, the settings don't stick and I can't send mail with that account either

Reproducible: Always

Steps to Reproduce:
1. Create an outgoing server that requires encryption
2. Try to send an email

Actual Results:  
Email fails to send with the issue stated above, smtp never issues STARTTLS upon connection to the server

Expected Results:  
Mail is sent properly
Comment 1 Dan O. 2014-12-08 23:10:41 UTC
Created attachment 89875 [details]
Setting the encryption option
Comment 2 Dan O. 2014-12-08 23:11:07 UTC
Created attachment 89876 [details]
Radio buttons cleared when the settings are reopened
Comment 3 Dan O. 2014-12-08 23:25:49 UTC
Also, I should add that pressing Auto Detect connects to my server and issues STARTTLS just find, interestingly enough, and sets the TLS encryption option in the settings with port 25. Saving, closing and reopening settings still clears the encryption setting.
Comment 4 Dan O. 2014-12-08 23:54:49 UTC
I had an idea a minute ago..

Adding "encryption=tls" to .config/mailtransports under the transport allows the mail to send successfully! Dumping TCP shows that it establishes the TLS connection perfectly fine, and the mail sends. It bounces from its destination because of bug 341457, but that's outside the scope of this bug.

KMail is unable to see this setting, the radio buttons are blank even though it works, which leads me to believe that it can't read or set that particular setting for whatever bizarre reason. This might be an easy fix to somebody more familiar to the code than me, but I'll look through and see if I can submit a patch myself.
Comment 5 Laurent Montel 2014-12-09 12:05:46 UTC
Git commit 8281b312d47ca5fdfc05892efcc7257573afbece by Montel Laurent.
Committed on 09/12/2014 at 12:01.
Pushed by mlaurent into branch 'master'.

There is a bug with porting as QGroupBox + kconfigwidgets. I need to investigate in KF5 directory

For the moment reverse to KButtonGroup
=> it fix Bug 341681 - Failure to transport message, must issue a STARTTLS command first. [Frameworks branch]

M  +11   -15   mailtransport/src/ui/smtpsettings_desktop.ui

http://commits.kde.org/kdepimlibs/8281b312d47ca5fdfc05892efcc7257573afbece