<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>49902</bug_id>
          
          <creation_ts>2002-10-30 00:10:58 +0000</creation_ts>
          <short_desc>KMail loses/confuses TLS settings</short_desc>
          <delta_ts>2007-09-14 12:17:01 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>10</classification_id>
          <classification>Unmaintained</classification>
          <product>kmail</product>
          <component>general</component>
          <version>unspecified</version>
          <rep_platform>Compiled Sources</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>grave</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="George Staikos">staikos</reporter>
          <assigned_to name="kdepim bugs">pim-bugs-null</assigned_to>
          
          
          <cf_commitlink></cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>102799</commentid>
    <comment_count>0</comment_count>
    <who name="George Staikos">staikos</who>
    <bug_when>2002-10-30 00:10:58 +0000</bug_when>
    <thetext>Version:            (using KDE Devel)
Installed from:    Compiled sources
Compiler:          gcc 2.95.3 
OS:          Linux

There seems to be a bug in KMail right now, and I would personally consider 
it to be a &quot;show stopper&quot;.  I say this because I dont&apos; fully understand it, 
but it seems to lose track of the TLS setting.  This could potentially be 
very bad.  While it is actually to strong in my case, I wonder if in other 
cases it might be too weak.  Here is how it is reproduced for me:

Launch kmail and use it only with identities that use TLS (for SMTP, POP3).  
Then try to send an email from an identity that doesn&apos;t use TLS.  In my case, 
this is because this server doesn&apos;t support TLS or SSL.  However KMail 
insists on using TLS, even though the configuration for the identity does not 
have TLS checked.  The result is a message box that says that TLS is not 
supported on the remote server.  If I shut down KMail, restart, then try 
resending before doing anything that uses TLS, it sends without any problems.

I have reproduced this problem several times now.  However I haven&apos;t done it 
in such smooth fashion as I descibe above, simply because I haven&apos;t 
investigated so far yet.  I just know that is what happened so far on several 
occasions.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102989</commentid>
    <comment_count>1</comment_count>
    <who name="Ingo Klöcker">kloecker</who>
    <bug_when>2002-10-31 01:07:11 +0000</bug_when>
    <thetext>Subject: Re:  New: KMail loses/confuses TLS settings

As I already wrote in a reply to George&apos;s message to kde-core-devel and 
kmail I think the bug is in the SMTP kioslave and not in KMail.

Regards,
Ingo


</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>122457</commentid>
    <comment_count>2</comment_count>
    <who name="George Staikos">staikos</who>
    <bug_when>2003-03-10 06:03:01 +0000</bug_when>
    <thetext>Ok I have diagnosed this.  Here&apos;s how it works: 
 
1) Send an email with an SMTP account that has TLS enabled. 
2) Send an email with an outbound account of smtp://host  (note nothing else 
there), to a host that doesn&apos;t support TLS. 
 
It will fail saying that TLS is not supported. 
 
Here is what the second SMTP (non-TLS) server says: 
 
220 tomts24.bellnexxia.net ESMTP server (InterMail vM.5.01.04.19 
201-253-122-122-119-20020516) ready Mon, 10 Mar 2003 00:00:11 -0500 
EHLO 0 
250-tomts24-srv.bellnexxia.net 
250-HELP 
250-PIPELINING 
250-DSN 
250-8BITMIME 
250 SIZE 10485760 
EHLP 
500 Command unknown: &apos;EHLP&apos; 
HELP 
214-This SMTP server is a part of the InterMail E-mail system.  For 
214-information about InterMail, please see http://www.software.com 
214- 
214-      Supported commands: 
214- 
214-           EHLO     HELO     MAIL     RCPT     DATA 
214-           VRFY     RSET     NOOP     QUIT 
214- 
214-      SMTP Extensions supported through EHLO: 
214- 
214-           EXPN     HELP     SIZE 
214- 
214-For more information about a listed topic, use &quot;HELP &lt;topic&gt;&quot; 
214 Please report mail-related problems to Postmaster at this site. 
 
 
Is it possible that there is a variable not getting reinitialised in kio_smtp? 
 </thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>122462</commentid>
    <comment_count>3</comment_count>
    <who name="George Staikos">staikos</who>
    <bug_when>2003-03-10 07:16:44 +0000</bug_when>
    <thetext>Subject: kdepim/kmail

CVS commit by staikos: 

So I fix my own bug reports I guess.
Properly determine SSL/TLS state for non-transport sending (ie using a URL
such as smtp://)

CCMAIL: 49902-done@bugs.kde.org


  M +21 -4     kmsender.cpp   1.171


--- kdepim/kmail/kmsender.cpp  #1.170:1.171
@@ -562,11 +562,28 @@ KMSendProc* KMSender::createSendProcFrom
       mTransportInfo-&gt;type = &quot;smtp&quot;;
       mTransportInfo-&gt;auth = FALSE;
+      mTransportInfo-&gt;encryption = &quot;NONE&quot;;
       QString serverport = transport.mid(7);
+      int colon = serverport.find(&apos;:&apos;);
+      if (colon != -1) {
+        mTransportInfo-&gt;host = serverport.left(colon);
+        mTransportInfo-&gt;port = serverport.mid(colon + 1);
+      } else {
       mTransportInfo-&gt;host = serverport;
       mTransportInfo-&gt;port = &quot;25&quot;;
+      }
+    } else
+    if (transport.startsWith(&quot;smtps://&quot;))
+    {
+      mTransportInfo-&gt;type = &quot;smtps&quot;;
+      mTransportInfo-&gt;auth = FALSE;
+      mTransportInfo-&gt;encryption = &quot;ssl&quot;;
+      QString serverport = transport.mid(7);
       int colon = serverport.find(&apos;:&apos;);
       if (colon != -1) {
         mTransportInfo-&gt;host = serverport.left(colon);
         mTransportInfo-&gt;port = serverport.mid(colon + 1);
+      } else {
+        mTransportInfo-&gt;host = serverport;
+        mTransportInfo-&gt;port = &quot;465&quot;;
       }
     }
@@ -580,8 +597,8 @@ KMSendProc* KMSender::createSendProcFrom
   if (mTransportInfo-&gt;type == &quot;sendmail&quot;)
     return new KMSendSendmail(this);
-  if (mTransportInfo-&gt;type == &quot;smtp&quot;)
+  if (mTransportInfo-&gt;type == &quot;smtp&quot; || mTransportInfo-&gt;type == &quot;smtps&quot;)
     return new KMSendSMTP(this);
 
-  return 0;
+  return 0L;
 }
 


</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>