Testing SMTP Using Telnet

Mark Berry August 17, 2007

I’m trying out a hosted anti-spam solution. This service works by becoming my public-facing mail server (DNS MX record), and relaying non-spam mail to the mail server in my office.

Due to a configuration error, I lost about 15 hours of email–the host wasn’t relaying for my domain. Email was bouncing with the message “553 Relaying is not supported”.

Lesson learned (with thanks to Ezra Herman):  before switching DNS, use Telnet to test the connection to the host and make sure it is accepting email for my domain. Here’s how to do it:

XFOR: Telnet to Port 25 to Test SMTP Communication
http://support.microsoft.com/kb/153119

The configuration is fixed, I sent myself an email using a Telnet session to the anti-spam host, so now I can update my DNS!

Update 4/28/2009:  This TechNet article explains testing SMTP with Telnet when authentication (but not SSL encryption) is needed:

How to Use Telnet to Test SMTP Communication
http://technet.microsoft.com/en-us/library/aa995718(EXCHG.65).aspx

Update 12/18/2009:  I tried to use Telnet to test sending a message to Go Daddy’s email server (smtp.secureserver.net). But whenever I typed

MAIL FROM:Admin@test.com

as described in KB 153119, I got this message:

501 #5.5.2 syntax error 'MAIL FROM:Admin@test.com'

I noticed in a MailEnable SMTP log that it encloses email addresses in angle brackets. Sure enough, when I typed

MAIL FROM:<Admin@test.com>

I got the expected response:

250 sender <Admin@test.com> ok

<Admin@test.com>
More...

About

Welcome to MCB Systems!

MCB Systems is a San Diego-based provider of software and information technology services.

Our software services include customization and programming to make software work for you.

Our proactive I.T. services help businesses control costs by providing a fixed monthly bill for routine I.T. services.

We take a consulting approach that listens first and provides solutions tailored to your business.

This Tech Blog is geared towards programmers and I.T. professionals, but end users may be interested to glimpse what goes on "behind the scenes" in developing software and keeping their computing environments stable and secure. Also visit the main Company Blog.

Mark Berry Blog author Mark Berry owns MCB Systems.

Contact MCB Systems today to discuss your technology needs!

Archive

Copyright © 2012 MCB Systems. All rights reserved.
Terms of Use - Privacy Policy
Created in WordPress using the Afterburner theme by RocketTheme.