[Top] [All Lists]

Re: what to say on timeout?

2004-01-03 19:23:28

--On Saturday, 03 January, 2004 20:35 -0500 "Richard O. Hammer" <ROHammer(_at_)EarthLink(_dot_)net> wrote:

When a SMTP server breaks a connection to a SMTP client
because of long inactivity (as suggested in RFC 2821 Section, should it break the connection silently? or should
it first send a 451, 554, or some other reply code?

Rich, I don't have time to look up the text (perhaps someone else does), but the general theory is that an SMTP server should never silently break connections but should send back a reply code and then wait for the client to issue a QUIT.

There is an exception of sorts, which should probably be more explicitly documented since it covers most of the real cases (people who agree on more explicitness should send text). Since SMTP is defined as essentially synchronous, there is no mechanism for a server which has already sent a reply code and is now waiting for a command to send a reply code of any sort. So it has little choice but to give up and close the connection.

The standard permits some flexibility about these cases (especially the first one) when driven by operational necessities: in addition to all of the "what to do about the spammers" cases/ discussions, spending a lot of time waiting for that QUIT when you've already timed out waiting for a command just doesn't make much sense. But, if you are in a position to send a reply code (i.e., you haven't already done so and are waiting for a command, if that case actually exists), I would be inclined to send it, wait at least a short time for a reply, and then give up, rather than giving up without sending the code.


<Prev in Thread] Current Thread [Next in Thread>