Bug 275006

Summary: RfC violation when sending messages
Product: [Applications] kmail2 Reporter: Rolf Eike Beer <kde>
Component: miscAssignee: kdepim bugs <kdepim-bugs>
Status: CONFIRMED ---    
Severity: normal CC: kdenis, pm
Priority: NOR    
Version: 4.14.1   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:

Description Rolf Eike Beer 2011-06-05 21:49:09 UTC
Version:           2.0.89 (using KDE 4.6.3) 
OS:                Linux

KMail2 drops the SMTP connection when it receives the message from the mail server that the mail has been accepted (i.e. the DATA phase was completed successfully). It MUST (RfC) send a QUIT and wait for the servers reply to that instead of just dropping the connection.

Reproducible: Didn't try




OS: Linux (i686) release 2.6.37-12-desktop
Compiler: gcc

This is a regression from KMail1 where this worked.
Comment 1 Torgny Nyblom 2011-06-07 20:11:54 UTC
Looking at the code it explicitly states that is should not close before sending a QUIT unless receiving an incomplete response. Could you please attach a transcript of one of the connections that does this premature closing?
Comment 2 Rolf Eike Beer 2011-06-07 21:05:58 UTC
Jun  5 18:08:17 mail Qsmtpd[24104]: > 220 mail.sf-mail.de Qsmtpd 0.19svn ESMTP
Jun  5 18:08:17 mail Qsmtpd[24104]: < EHLO donald.sf-tec.de
Jun  5 18:08:17 mail Qsmtpd[24104]: > 250-mail.sf-mail.de
Jun  5 18:08:17 mail Qsmtpd[24104]: > 250-ENHANCEDSTATUSCODES
Jun  5 18:08:17 mail Qsmtpd[24104]: > 250-PIPELINING
Jun  5 18:08:17 mail Qsmtpd[24104]: > 250-8BITMIME
Jun  5 18:08:17 mail Qsmtpd[24104]: > 250-STARTTLS
Jun  5 18:08:17 mail Qsmtpd[24104]: > 250 SIZE
Jun  5 18:08:17 mail Qsmtpd[24104]: < STARTTLS
Jun  5 18:08:17 mail Qsmtpd[24104]: > 220 ready for tls
Jun  5 18:08:18 mail Qsmtpd[24104]: <e EHLO donald.sf-tec.de
Jun  5 18:08:18 mail Qsmtpd[24104]: >e 250-mail.sf-mail.de
Jun  5 18:08:18 mail Qsmtpd[24104]: >e 250-ENHANCEDSTATUSCODES
Jun  5 18:08:18 mail Qsmtpd[24104]: >e 250-PIPELINING
Jun  5 18:08:18 mail Qsmtpd[24104]: >e 250-8BITMIME
Jun  5 18:08:18 mail Qsmtpd[24104]: >e 250-AUTH LOGIN PLAIN
Jun  5 18:08:18 mail Qsmtpd[24104]: >e 250 SIZE
Jun  5 18:08:18 mail Qsmtpd[24104]: <e AUTH PLAIN AAAA==
Jun  5 18:08:18 mail Qsmtpd[24104]: >e 235 2.0.0 ok, go ahead
Jun  5 18:08:18 mail Qsmtpd[24104]: <e MAIL FROM:<eike@sf-mail.de> SIZE=2498
Jun  5 18:08:18 mail Qsmtpd[24104]: >e 250 2.1.5 sender <eike@sf-mail.de> is syntactically correct
Jun  5 18:08:18 mail Qsmtpd[24104]: <e RCPT TO:<foo@example.com>
Jun  5 18:08:18 mail Qsmtpd[24104]: >e 250 2.1.0 recipient <foo@example.com> OK
Jun  5 18:08:18 mail Qsmtpd[24104]: <e DATA
Jun  5 18:08:18 mail Qsmtpd[24104]: >e 354 Start mail input; end with <CRLF>.<CRLF>
Jun  5 18:08:18 mail Qsmtpd[24104]: >e 250 2.5.0 accepted message for delivery

The contents of the DATA phase are not logged by my mail daemon. The password and recipient information has been changed, otherwise the log is authentic.

Eike
Comment 3 pm 2015-04-15 09:26:32 UTC
I'm still observing this problem in 

Kmail: 4.14.1
KDE: 4.14.1

It looks like a very old and unresolved bug, also appearing in 
  https://bugs.kde.org/show_bug.cgi?id=94748
  
It causes error logs at the server side, and connections to last longer than necessary.

pm.