1

I have a simple SMTP server installed on an IIS instance on a Win2k3 server. I want to figure out why my messages have stopped being relayed, but apparently I have to install Exchange System Manager to do this? I

4 Answers 4

3

Exchange System Manager has nothing to do with the IIS SMTP service. Happily!

The IIS SMTP service is configured through the IIS Manager. If it has stopped allowing you to relay through it, the Relay Restrictions have probably been set to prevent you. I don't know of a way to check those settings from the command-line, though.

2
  • You can check it from the command line if you consider a telnet session from the command prompt as checking it from the command line. ;)
    – joeqwerty
    Jan 22, 2011 at 2:23
  • Snerk point taken. But it isn't a terribly robust tool for making changes.
    – sysadmin1138
    Jan 22, 2011 at 2:26
1

You could telnet into the server at the SMTP port (default 25, but could be different) and see if it responds with a 250 OK.

If it doesn't, start with the firewall and such.

2
  • you can send a whole email through the telnet terminal session. I'm sure it's easy to find with a search engine.
    – DutchUncle
    Jan 22, 2011 at 0:41
  • 200 OK is an HTTP response. 250 OK is an SMTP response.
    – joeqwerty
    Jan 22, 2011 at 2:21
0

I would use a command line email tool called blat, from www.blat.net. When sending an email you can use the -superdebugT option which will give you an ascii dump the data between Blat and the SMTP server. This will show you every SMTP command sent to the server and it's result.

0

JohnThePro is right, you can just use the telnet client built into most operating systems. SMTP is a simple text-based protocol, and most servers will wait patiently as you type. Often this will give you a very good idea of just where the problem lies. Try entering this at a command line.

> telnet mail.contoso.com 25

Here's an example conversation where responses from the server are prefixed by S: and text entered by the user is prefixed by C:.

S: 220 mail.contoso.com ESMTP

C: EHLO myhostname
S: 250-mail.contoso.com
S: 250-8BITMIME
S: 250 SIZE 10485760

C: mail from:<[email protected]>
S: 250 sender <[email protected]> ok

C: rcpt to:<[email protected]>
S: 250 recipient <[email protected]> ok

C: data
S: 354 go ahead

C: Subject: test
C: 
C: test
C: .
S: 250 ok:  Message 378625388 accepted

C: quit
S: 221 mail.contoso.com

For (much) more detail, consult the SMTP standard, RFC 2821.

If you're able to have this conversation with the server, you know that the mail message is getting at least that far. If there are still problems, you might want to use a packet sniffing tool like Wireshark to watch for outbound SMTP traffic from the server that might give you more clues.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .