ietf-smtp
[Top] [All Lists]

Re: Multi-line Greetings - where to put official greeting line (Top or Bottom?)

2004-01-22 17:18:45

I did however discover one thing. I was sending the initial greeting
via 2 write sys-calls. Think of it like this:

write(fd, "220 h.db.org ESMTP ready", 24);
...
...
write(fd, "\r\n", 2);

This confused the "Mail Test" to the point where it claimed not to
have received a valid response. Now I'm no expert, but I can't remember
having read anything that mandates that the whole response be sent in
one TCP packet.

That's because there is no such mandate. And even if there were such a mandate
it could not be enforced from an application since how a TCP stack decides to
map I/O operations into packets on the wire can and does vary. (Some
implementations allow some degree of control over this but others do not.)

With the exception of spam sending malware it doesn't
seem to be a problem for anyone else sending me mail.

Right, because implementations are supposed to be tolerant in this regard.

Can someone confirm that it is acceptable to send SMTP responses divided
over several TCP packets?

It is perfectly acceptable, although the converse is more commonly
seen, that is, multiple responses being sent in a single packet. (This
has also been known to cause problems with incompliant implementations.)

                                Ned


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