Closed
Bug 93430
Opened 24 years ago
Closed 23 years ago
SMTP connection isn't closed with a QUIT
Categories
(MailNews Core :: Networking: SMTP, defect)
MailNews Core
Networking: SMTP
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: amla70, Assigned: bugzilla)
References
Details
Attachments
(1 file, 2 obsolete files)
|
842 bytes,
patch
|
cavin
:
review+
Bienvenu
:
superreview+
|
Details | Diff | Splinter Review |
Looking at the logs of my mail server I've realized that Mozilla doesn't send
the 'QUIT' command to close connection with the SMTP server.
the log of a mail sended with mozilla looks at the end like this:
02/08/01 23:37:47 - ( 11) DATA
02/08/01 23:37:47 - ( 11) 354 Enter mail, end with "." on a line by itself
02/08/01 23:37:47 - [ 12] Delivering to alfonso@casa
02/08/01 23:37:47 - [ 12] Message from mozilla@casa delivered to alfonso@casa
02/08/01 23:37:47 - ( 11) 250 Message accepted for delivery.
02/08/01 23:37:48 - ( 11)
02/08/01 23:37:48 - Error: [10054] Connection reset by peer
but if the mail is sent with other program, this is how it goes:
02/08/01 23:38:47 - ( 14) DATA
02/08/01 23:38:47 - ( 14) 354 Enter mail, end with "." on a line by itself
02/08/01 23:38:47 - ( 14) 250 Message accepted for delivery.
02/08/01 23:38:48 - [ 15] Delivering to mozilla@casa
02/08/01 23:38:48 - [ 15] Message from alfonso@casa delivered to mozilla@casa
02/08/01 23:38:48 - ( 14) QUIT
02/08/01 23:38:48 - ( 14) 221 Aba he
using mozilla with another mail server this is part of the log:
With other mail server:
Aug 3 18:34:12 blackice smap[9952]: connect host=imac.aycuens.com/192.168.2.14
Aug 3 18:34:12 blackice smap[9952]: host=imac.aycuens.com/192.168.2.14 bytes=630
from=<alvaro@aycuens.com> to=<mozilla@aycuens.com> xma009952
Aug 3 18:34:12 blackice smap[9952]: exiting host=imac.aycuens.com/192.168.2.14
bytes=630
Aug 3 18:34:13 blackice smap[9952]: peer dropped connection: Success
instead of:
Aug 3 17:54:25 blackice smap[9765]: host=stargate.aycuens.com/192.168.2.10
bytes=1035 from=<alvaro@aycuens.com> to=<miguel@asiinfo.dyndns.org> xma009765
Aug 3 17:54:25 blackice smap[9765]: exiting
host=stargate.aycuens.com/192.168.2.10 bytes=1035
tried on Mac build id: 2001080208
linux: build 2001080108
and win98: 2001080114
The problem is similar to bug 62836, but indeed, it affects even succesful
connections
| Reporter | ||
Comment 2•24 years ago
|
||
The first and second logs are from Argosoft Mail server, the first one with
Mozilla, and the second with Outlook.
Nominating for 0.9.6, just in hope that this get fixed before 1.0
Keywords: mozilla0.9.6
Comment 3•24 years ago
|
||
Note that section 4.1.1 of the SMTP specification (RFC821) states:
"The receiver should not close the transmission channel until it receives and
replies to a QUIT command (even if there was an error). The sender should not
close the transmission channel until it send a QUIT command and receives the
reply (even if there was an error response to a previous command)."
In modern RFC parlance, this is a "MUST" requirement. That means that Mozilla's
SMTP engine is currently broken, and this should really, really be fixed before 1.0.
Comment 4•24 years ago
|
||
Reporter,
Is this still a problem with recent builds?
Comment 5•24 years ago
|
||
I'm not the reporter, but: yes, it's still broken.
As of the 2001-12-14 build, Mozilla closes the TCP connection to the SMTP server
itself, instead of sending the QUIT command and waiting for the server to
initiate the close.
In order to comply with RFC821, Mozilla must instead send the QUIT command, read
the server's response, wait for the server to close its end of the connection,
and then close its end of the connection.
| Reporter | ||
Comment 6•24 years ago
|
||
As James said this hasn't fixed by itself.
This is the end of the log generated by Mozilla with Set NSPR_LOG_MODULES=SMTP:5
0[7b0070]: SMTP Response: 250 Message accepted for delivery.
0[7b0070]: SMTP entering state: 10
0[7b0070]: SMTP Send: quit
0[7b0070]: SMTP entering state: 11
0[7b0070]: SMTP entering state: 13
So it seems that Mozilla tries to send the QUIT, but doesn't wait for the server
response and closes the connection.
(the server log is the same than previously reported)
Updated•23 years ago
|
Status: NEW → ASSIGNED
Updated•23 years ago
|
Keywords: mozilla0.9.6
I also noticed this error...on some mail server's it can cause the connection to
linger probably. Although its not a problem for me, it should be fixed to be
standards-compliant. It doesn't look good.
Comment 8•23 years ago
|
||
I see the "connection dropped" messages in my mail server logs too :-(
Comment 9•23 years ago
|
||
see also bug 93210 that was filed for LDAP (send LOGOUT when connectino is closed)
Comment 10•23 years ago
|
||
This bug still present in Mozilla 1.1 alpha build 2002071308.
Comment 11•23 years ago
|
||
*** Bug 62836 has been marked as a duplicate of this bug. ***
Comment 12•23 years ago
|
||
Bug 62836 is re-opened as it is not a duplicate of this bug.
Comment 13•23 years ago
|
||
I can still reproduce this bug on the v1.2b trunk build 2002101808 for win32.
I'm glad to see this bug is assigned, instead of just new however.
| Assignee | ||
Comment 14•23 years ago
|
||
Tested only on windows, but it works. Tested with ArGoSoft mail server. With
the patch, the server responds as follows
1/13/2003 11:33:00 PM - Requested SMTP connection from 127.0.0.1
1/13/2003 11:33:00 PM - ( 12) 220 ArGoSoft Mail Server, Version 1.8
(1.8.1.2)
1/13/2003 11:33:00 PM - ( 12) EHLO 127.0.0.1
1/13/2003 11:33:00 PM - ( 12) 250-Welcome [127.0.0.1], pleased to meet you
1/13/2003 11:33:00 PM - ( 12) 250-SIZE 5242880
1/13/2003 11:33:00 PM - ( 12) 250 HELP
1/13/2003 11:33:00 PM - ( 12) MAIL FROM:<luke@127.0.0.1>
1/13/2003 11:33:00 PM - ( 12) 250 Sender "luke@127.0.0.1" OK...
1/13/2003 11:33:01 PM - ( 12) RCPT TO:<mozilla@127.0.0.1>
1/13/2003 11:33:01 PM - ( 12) 250 Recipient "mozilla@127.0.0.1" OK...
1/13/2003 11:33:01 PM - ( 12) DATA
1/13/2003 11:33:01 PM - ( 12) 354 Enter mail, end with "." on a line by
itself
1/13/2003 11:33:03 PM - [ 13] Delivering to mozilla@127.0.0.1
1/13/2003 11:33:03 PM - [ 13] Message from luke@127.0.0.1 delivered to
mozilla@127.0.0.1
1/13/2003 11:33:03 PM - ( 12) 250 Message accepted for delivery.
1/13/2003 11:33:03 PM - ( 12) quit
1/13/2003 11:33:03 PM - ( 12) 221 Aba he
1/13/2003 11:33:03 PM - SMTP connection with 127.0.0.1 ended. ID=12
Attachment #111471 -
Flags: review?(cavin)
Comment 15•23 years ago
|
||
Comment on attachment 111471 [details] [diff] [review]
2 line patch that fixes the problem on windows
r=cavin. good fix.
Attachment #111471 -
Flags: review?(cavin) → review+
Attachment #111471 -
Flags: superreview?(bienvenu)
Comment 16•23 years ago
|
||
There's nothing wrong with the fix, but maybe the QUIT command should be all
uppercase, to match the other commands Mozilla (and most other SMTP servers) send?
Comment 17•23 years ago
|
||
Section 2.4 of RFC2821 says:
A few SMTP servers, in violation of this specification (and RFC
821) require that command verbs be encoded by clients in upper
case. Implementations MAY wish to employ this encoding to
accommodate those servers.
Therefore, I agree with Thomas Winzig; even though command verbs are supposed to
be case-insensitive, ensuring that Mozilla emits only uppercase command verbs
will cost nothing, and increase Mozilla's interoperability.
Comment 18•23 years ago
|
||
| Assignee | ||
Comment 19•23 years ago
|
||
Correct patch now fixes problem, and changes quit to QUIT
Attachment #111471 -
Attachment is obsolete: true
Attachment #111548 -
Attachment is obsolete: true
Comment 20•23 years ago
|
||
These patches fix the problem for me too (NTMail v6.04.0010)
Comment 22•23 years ago
|
||
Comment on attachment 111565 [details] [diff] [review]
Updated patch updating quit to QUIT
A blockingx.x-flag won't affect the review process. If it is reviewed then it
will be checked in - in time for 1.3b
Attachment #111565 -
Flags: superreview?(bienvenu)
Attachment #111565 -
Flags: review?(cavin)
Updated•23 years ago
|
Flags: blocking1.3b?
Comment 23•23 years ago
|
||
Comment on attachment 111565 [details] [diff] [review]
Updated patch updating quit to QUIT
sr=bienvenu
Attachment #111565 -
Flags: superreview?(bienvenu) → superreview+
Comment 24•23 years ago
|
||
Comment on attachment 111565 [details] [diff] [review]
Updated patch updating quit to QUIT
r=cavin.
Attachment #111565 -
Flags: review?(cavin) → review+
Comment 25•23 years ago
|
||
opss, seems that I didn't fully understood the flag thing, or my bugzilla perms
doesn't review the full options of it, anyway it has been reviewed,I've learned
for the next time, as soon as is checked in, I try it and we can close this ugly
bug :)
Reassigning to patch's author, Luke Harless
Assignee: mscott → luke_harless
Status: ASSIGNED → NEW
Patch checked in by Timeless at 01/16/2003 19:39 PDT.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Comment 28•23 years ago
|
||
Verified on:
MacOS X Build 2003011708
Win32 Build 2003011713
SMTP doesn't complain more about peer droppeding connection, snip of the log below:
Jan 18 15:25:50 blackice smap[19176]: connect
host=devastator.aycuens.com/192.168.2.10
Jan 18 15:25:51 blackice smap[19176]: host=devastator.aycuens.com/192.168.2.10
bytes=657 from=<bug93430@aycuens.com">bug93430@aycuens.com> to=<alvarooolists@aycuens.com>
Jan 18 15:25:51 blackice smap[19176]: exiting
host=devastator.aycuens.com/192.168.2.10 bytes=657
Status: RESOLVED → VERIFIED
Updated•23 years ago
|
Attachment #111471 -
Flags: superreview?(bienvenu)
Comment 29•22 years ago
|
||
*** Bug 220909 has been marked as a duplicate of this bug. ***
Updated•21 years ago
|
Product: MailNews → Core
Updated•17 years ago
|
Product: Core → MailNews Core
You need to log in
before you can comment on or make changes to this bug.
Description
•