0

When I go to the local terminal on my Exchange box (SBS 2008) I can do this:

telnet 127.0.0.1 25
220 Exchange banner here
EHLO example.com
250 Server name

However when I go from another box, or from the actual IP of the server I get this:

telnet 192.168.21.20 25
220 Exchange banner here
EHLO example.com
421 4.4.1 Connection timed out

Connection to host lost.

The odd thing is, this server is currently in production and working fine (receiving mail for our entire domain). But my C# programs can't send mail to it (they get this same error).

Any ideas?

2 Answers2

1

The Exchange server appears to be trying to connect back to you (something like ident?), so you should try a packet sniffer (like Wireshark) to see where it is trying to connect.


Another way to interpret that message. SMTP, like most internet protocols, uses CR/LF pair as line terminator. And so does the telnet protocol. However, it might happen that in your second example, the client (is it "telnet" or something else?) does not send the correct line ending - maybe it sends just LF or something entirely different. Again, use Wireshark to find out.


Related to #2 above: Maybe your second machine has an antivirus program that tries to be smart and intercepts SMTP connections? I've seen many occassions of them breaking POP3.

user1686
  • 10,162
  • 1
  • 26
  • 42
0

In your application are you using a standard smtp lib or are you sending the commands down a raw socket? If you are sending the commands down raw check whether or not you are sending a \r\n after the command.

J

James
  • 128
  • 3
  • 15
  • Well telnet isn't working either, so it's a bigger issue than my program. But no I'm using the standard .NET System.Net libraries. –  Feb 17 '10 at 23:57
  • Are you telneting to localhost on the server or to the publicly facing IP? J – James Feb 18 '10 at 00:36
  • localhost works (as shown above), public ip does not. I'd think it would be a windows firewall issue, but I get the server connection banner. –  Feb 18 '10 at 02:59