Testing SMTP




Testing SMTP

MANY OF THESE PROCEDURES WILL NOT WORK ANY MORE…
INTERNET EMAIL SECURITY HAS INCREASED GREATLY

In many copiers you can scan to email. This means that a scan goes in and is transmitted by your copier via an smtp server to the desired email address. This provides portability to your data. In other words, you are not restricted by a pc or a folder its in your email and reachable from many places. Most scans can be made in tiff or pdf. TIFF for engineering and PDF for business. As always the case something always goes wrong and its necessary to rule out the smtp server.

This one is for windows via telnet or command line. With this you can test an smtp server that is on the internet.

This is a complete sample smtp session you can memorize and use it to test smtp reliability on client’s network:

Session START================================

//You begin by typing in telnet and the IP address of the smtp server followed by the port in this case the IP is 207.132.221.51 and your port is 25

telnet 207.132.221.51 25

helo

mail from: <email address>

rcpt to: <email address>

data

subject: test from telnet

from: <email address>

to: <email address>

this is a test

bye

.

Session END====================================

Now lets do the same thing but with an exchange server

1. Telnet into Exchange server hosting IMS service using TCP port 25.
Command is telnet <servername> 25

2. Turn on local echo on your telnet client so that you can see what you are typing.
On Win 9x and NT 3.5/4.0 Telnet client this done by selecting the “preferences” from the “terminal” pull down menu, and checking the local echo radio button. For Windows 2000 telnet client, issue command “set local_echo”, from the telnet command prompt.

3. Issue the following smtp command sequence

helo <your domain name><enter>
response should be as follows
250 OK

mail from: <your Email Address><enter>
response should be as follows
250 OK – mail from <your Email address>

rcpt to: <recipient address><enter>
response should be as follows
250 OK – Recipient <recipient address>

data<enter>
response should be as follows
354 Send data. End with CRLF.CRLF

To: <recipient’s display name><enter>
From: <your display name><enter>
Subject: <Subject field of Email message><enter>
<Enter you body text><enter><enter> . <enter>
response should be as follows
250 OK

quit<enter>

Now lets do the same test for linux

The HELO command (SMTP commands are case insensitive) provides the remote server with your hostname or domain name.
mail from:<mick@dogpeople.org>

The MAIL command is used to specify your email’s “from:” address. Again, this is usually taken at face value.
rcpt to:<groucho@hackenbush.com>

Use the RCPT command to specify your email’s “to:” address. This address may or may not be validated: a well-configured SMTP host will reject non local destination addresses for incoming mail to prevent unauthorized mail relaying.
data

DATA means “and now, here’s the message.” To specify an optional Subject line, make the first word of the first line of your message “Subject:”, followed immediately by your subject string. You can specify other SMTP headers too, each on its own line; if you want, you can even make headers up — e.g., “X-Slartibartfast: Whee!”

When your message is complete, type a period on an empty line, and press RETURN.
quit

QUIT closes the SMTP session.

My own procedure to test any SMTP server I set up is first to deliver a message this way from the server to itself — i.e., telnet localhost 25. If that succeeds, I then try the same thing from a remote system.

This technique doesn’t work for advanced setups like SMTP over TLS (covered later in this chapter), but it’s a fast, simple, and reliable test for basic SMTP server configurations, especially when you need to verify that anti relaying and other controls have been set correctly.

Related External Links

This entry was posted in Scan and tagged , , , , , , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>