Bug 68116 - KMail SMTP session timeout
Summary: KMail SMTP session timeout
Status: RESOLVED FIXED
Alias: None
Product: kio
Classification: Frameworks and Libraries
Component: smtp (show other bugs)
Version: 3.1.1
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Marc Mutz
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-11-13 14:18 UTC by arpadf
Modified: 2004-02-08 13:44 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 arpadf 2003-11-13 14:18:54 UTC
Version:           1.5.4 (using KDE KDE 3.1.4)
Installed from:    Unlisted Binary Package
OS:          Linux

Kmail responds with:
>>>
Sending failed:
The message content was not accepted.
The server responded: ""
<<<

The reason: the connexion passes through a SMTP proxy which performs virus scanning. The email is sent by Kmail (and received by the proxy) but the scanning takes more than 60 seconds to complete and Kmail does not wait for the answer.
It would be nice to ask if you want to wait for the response from the server and optionally to allow the customisation of the timeout period.

Also this is from RFC 2821:
DATA Termination: 10 minutes.
      This is while awaiting the "250 OK" reply.  When the receiver gets
      the final period terminating the message data, it typically
      performs processing to deliver the message to a user mailbox.  A
      spurious timeout at this point would be very wasteful and would
      typically result in delivery of multiple copies of the message,
      since it has been successfully sent and the server has accepted
      responsibility for delivery.
Comment 1 Marc Mutz 2004-02-07 13:00:27 UTC
Please re-check with KDE 3.2. The SMTP protocol implementation is a complete rewrite over KDE 3.1's.
Comment 2 Marc Mutz 2004-02-08 13:28:11 UTC
Subject: KDE_3_2_BRANCH: kdebase/kioslave/smtp

CVS commit by mutz: 

>From HEAD:

Increase timeout to the rfc2821-recommended minimum of 10 minutes. Actully, this timeout value is only recommended for the the final response to DATA, but we don't yet support different timeout values for different commands, and 10mins is the maximum of the recommended minimum timeout values for various SMTP commands.

CCMAIL: 68116-done@bugs.kde.org


  M +1 -1      smtp.cc   1.139.2.2


--- kdebase/kioslave/smtp/smtp.cc  #1.139.2.1:1.139.2.2
@@ -292,5 +292,5 @@ Response SMTPProtocol::getResponse( bool
   do {
     // wait for data...
-    if ( !waitForResponse( 60 ) ) {
+    if ( !waitForResponse( 600 ) ) {
       error( KIO::ERR_SERVER_TIMEOUT, m_sServer );
       return response;


Comment 3 Marc Mutz 2004-02-08 13:44:53 UTC
Fixed in KDE_3_1_BRANCH, too.