Summary: | KMail loses/confuses TLS settings | ||
---|---|---|---|
Product: | [Unmaintained] kmail | Reporter: | George Staikos <staikos> |
Component: | general | Assignee: | kdepim bugs <kdepim-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | grave | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
George Staikos
2002-10-30 00:10:58 UTC
Subject: Re: New: KMail loses/confuses TLS settings As I already wrote in a reply to George's message to kde-core-devel and kmail I think the bug is in the SMTP kioslave and not in KMail. Regards, Ingo Ok I have diagnosed this. Here'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'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: 'EHLP' 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 "HELP <topic>" 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? 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->type = "smtp"; mTransportInfo->auth = FALSE; + mTransportInfo->encryption = "NONE"; QString serverport = transport.mid(7); + int colon = serverport.find(':'); + if (colon != -1) { + mTransportInfo->host = serverport.left(colon); + mTransportInfo->port = serverport.mid(colon + 1); + } else { mTransportInfo->host = serverport; mTransportInfo->port = "25"; + } + } else + if (transport.startsWith("smtps://")) + { + mTransportInfo->type = "smtps"; + mTransportInfo->auth = FALSE; + mTransportInfo->encryption = "ssl"; + QString serverport = transport.mid(7); int colon = serverport.find(':'); if (colon != -1) { mTransportInfo->host = serverport.left(colon); mTransportInfo->port = serverport.mid(colon + 1); + } else { + mTransportInfo->host = serverport; + mTransportInfo->port = "465"; } } @@ -580,8 +597,8 @@ KMSendProc* KMSender::createSendProcFrom if (mTransportInfo->type == "sendmail") return new KMSendSendmail(this); - if (mTransportInfo->type == "smtp") + if (mTransportInfo->type == "smtp" || mTransportInfo->type == "smtps") return new KMSendSMTP(this); - return 0; + return 0L; } |