Minimal SMTPserver app fails on non-development machine!

Giganews Newsgroups
Subject: Minimal SMTPserver app fails on non-development machine!
Posted by:  nd (no@spam.com)
Date: Thu, 5 May 2005

Hi all,
When deploying my app I ran into an easily reproducible problem.
Anyone care to try this:

Create new app, drop a tidSMTPserver on the form, assign it OnRcptTo event
like this:

procedure TForm1.IdSMTPServer1RcptTo(ASender: TIdSMTPServerContext;
  const AAddress: String; var VAction: TIdRCPToReply;
  var VForward: String);
begin
  VAction:=rAddressOK;
end;

About as simple as it get, right?

Now, when I run this on my development machine with D6 and indy 10.0.24
installed, I get the expected result. Performing the SMTP dialog manually
with "telnet 127.0.0.1 25", everything runs normally like this:

220 Welcome to the INDY SMTP Server
helo MeHere
250 Hello MeHere
mail from:me
250 me Address Okay
rcpt to:you
250 you Address Okay
data
354 Start mail input; end with <CRLF>.<CRLF>

etst
test
test
.
250 Ok
quit
221 Signing Off
Connection to host lost

Of course, this simple test-app performs no actual processing and the
message is simply lost, but the SMTP dialog completes as expected.
However, the following fails:

-copy the EXE to a remote machine,
-executing it there,
-telnet'ing from my development machine to port 25 on the remote machine

This time, the exact same SMTP dialog, fails like this:

220 Welcome to the INDY SMTP Server
helo MeHere
250 Hello MeHere
mail from:me
250 me Address Okay
rcpt to:you
250 you Address Okay
data
354 Start mail input; end with <CRLF>.<CRLF>

test
test
test
.

Connection to host lost
..and telnet terminates prematurely.

Another interesting fact: Running the telnet dialog from the remote machine
to itself (telnet 127.0.0.1 25) works!

So, the obvious thing to look for is some built-in anti-spam functionality
in tidSMTPserver, disconnecting all but local senders by default? Dont think
so, at least I couldn't find it....

Yet another interesting fact: Telnet'ing into my development machine from a
third macine also works!

I'm confused.

Anyone please?!?

Replies