Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question

4 Answers 4

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.

share|improve this answer
    
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 '11 at 2:23
    
Snerk point taken. But it isn't a terribly robust tool for making changes. –  sysadmin1138 Jan 22 '11 at 2:26

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.

share|improve this answer
    
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 '11 at 0:41
    
200 OK is an HTTP response. 250 OK is an SMTP response. –  joeqwerty Jan 22 '11 at 2:21

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.

share|improve this answer

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:<sender@contoso.com>
S: 250 sender <sender@contoso.com> ok

C: rcpt to:<recipient@contoso.com>
S: 250 recipient <recipient@contoso.com> 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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.