ietf-smtp
[Top] [All Lists]

Re: out of sequence smtp communication

2005-04-27 06:49:51

Sean,

This is just a swag (scientific wild ass guess).  The only thing that comes
to my mind on how this might possibly happen is

a) when sending a packet far greater than what the actual data demands,
and/or
b) you are not reading all the data from the socket correctly.

So you migh have inadvertingly have something like this:

    char szCmd[1024*8];
    strcpy(szCmd, "EHLO blah\r\n");
    send(socket, szCmd,sizeof(szCmd),0);

where you are sending the entire block, rather then the length:

    send(socket, szCmd,strlen(szCmd),0);

and you might not reading the entire socket, might be leaving behind a byte
or two which is enough to cause a reset which I can see in the tail end of
your network dump.

You did say your TCP is rusty. <g>

Anyway, it has been my experience that issues related to resets like this is
usually dye to incorrect reading/writing the socket.  This is especially
true in the ADSL market where we have a bandwidth mismatch (faster reading,
slowing writing) which pretty much mandates proper TCP half close operations
(per TCP/IP Illustrated Volume 1)

Swag!

--
Hector Santos, Santronics Software, Inc.
http://www.santronics.com






----- Original Message -----
From: "Sean Murray" <murray(_at_)tlabs(_dot_)ac(_dot_)za>
To: <ietf-smtp(_at_)imc(_dot_)org>
Cc: <clug-tech(_at_)clug(_dot_)org(_dot_)za>
Sent: Monday, April 25, 2005 8:16 AM
Subject: out of sequence smtp communication



Hi

I have a problem with smtp transaction.
I often get a 503 error, well far more often than i would like.

The destination mail server accuses mine of sending a MAIL FROM before
it has received the EHLO/HELO command, duplicate EHLO/HELO or of out "out
of sequence smtp communication"

I have attached an example packet sniff at the bottom. If someone wants
the
full sniff I can send it off list, its about 22k for this example.

The server is exim 4.32 (RHEL3) but this occurs using pmdf7(vms7.2) as
well and the remote mailservers
are all types from exim,postfix,qmail,sendmail, mailmarshal, exchange and
some i have not heard
of.

A couple of odd things:
1. I get retransmissions in under 1 sec ( faulty misconfigured router ? ).
There are 2
cisco routers between the mail server and the outside.
2. the retransmission of the 250 response appears in numerous place and
not only the 503 error
however all the 503 errors do have a retransmission error of their 250.
3. This is all on top of tcp, while my tcp is abit rusty i thought tcp
guaranteed a connection and
handled errors for things running on top of it, barring long timeouts of
course, yet i seem to loose commands for some reason.
4. It is not specific to a particular server and 10 seconds later
sometimes another mail will go through to the remote server,
without the error.

Any suggestions would be greatly appreciated.

Thanks
Sean




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