IdSMTPServer and Custom Client communicating wrong

Giganews Newsgroups
Subject: IdSMTPServer and Custom Client communicating wrong
Posted by:  Han Bongers (hanbonge…@home.nl)
Date: Fri, 28 Jul 2006

Hello,

I've build a SMTP Server based on an IdSMTPServer component (Delphi 2005,
Indy 10.0.52).
It's running as a windows service, and its purpose is to delay email send
from certain adresses (these messages get stored in a database).
With messages send from Outlook, Outlook Express and an ASP webshop on IIS
the service works perfect.

The problem is that our client has a custom made application which emails we
need to delay, and that program doesn't send email trough our service.
See the following logfile.

*** Log from IdServerInterceptLogFile:
127.0.0.1:2755 Stat Connected.
127.0.0.1:2755 Sent 28-7-2006 10:28:46: 220-Welcome to the NLSTORE Mail
Relay<EOL>220 <EOL>
127.0.0.1:2755 Recv 28-7-2006 10:28:46: EHLO athlon-xp3200<EOL>
127.0.0.1:2755 Sent 28-7-2006 10:28:46: 250-Hello athlon-xp3200<EOL>250-AUTH
LOGIN<EOL>250-ENHANCEDSTATUSCODES<EOL>250 PIPELINING<EOL>
127.0.0.1:2755 Recv 28-7-2006 10:28:47: AUTH LOGIN<EOL>
127.0.0.1:2755 Sent 28-7-2006 10:28:47: 334 VXNlcm5hbWU6<EOL>
127.0.0.1:2755 Recv 28-7-2006 10:28:47: YWRtaW5AbmxzdG9yZS5ubA==<EOL>
127.0.0.1:2755 Sent 28-7-2006 10:28:47: 334 UGFzc3dvcmQ6<EOL>
127.0.0.1:2755 Recv 28-7-2006 10:28:47: bmxzMTE4<EOL>
127.0.0.1:2755 Sent 28-7-2006 10:28:47: 235 2.7.0  welcome
adm…@nlstore.nl<EOL>
127.0.0.1:2755 Recv 28-7-2006 10:28:47: RSET<EOL>MAIL
FROM:<adm…@nlstore.nl><EOL>RCPT TO:<hanbonge…@home.nl><EOL>DATA<EOL>
127.0.0.1:2755 Sent 28-7-2006 10:28:47: 250 Ok<EOL>
127.0.0.1:2755 Sent 28-7-2006 10:28:47: 250 2.1.0 adm…@nlstore.nl Address
Okay<EOL>
127.0.0.1:2755 Sent 28-7-2006 10:28:47: 250 2.1.5 hanbonge…@home.nl Address
Okay<EOL>
127.0.0.1:2755 Sent 28-7-2006 10:28:47: 354 Start mail input; end with
<CRLF>.<CRLF><EOL>
127.0.0.1:2755 Stat Disconnected.
*** End of Log

The custom made application connects and authenticates, but then things go
wrong.
The application sends "RSET", "MAIL FROM", "RCPT TO" and "DATA" after each
other, but doesn't seem to wait for a respond.
It then receives al the responses after each other and disconnects.

When connecting with the other tested mail programs (Outlook, Outlook
Express, and IIS) the InterceptLog shows they wait for a response after
every one of these commands.

The custom made application is also using Indy, but sinds the software
developer does no longer exist we don't now which version, and don't have
any source code :(

The IdSMTPServer is probably working as it should, but our clients custom
made application isn't.
All expected events in IdSMTPServer are being triggered, except for
MsgReceive (communication doesn't reach that part).
No exceptions are raised at server side.

Any suggestions on how to work around this?

Thanks in advance,
Han Bongers

Replies