Wednesday, April 27, 2011

How to test SMTP Mail Gateway From a Command Line Interface

SMTP Mail Gateway From a Command Line Interface
======================================================


Note that:- be careful when typing any command or message


1. Start a telnet session to the SMTP server's communication port.
From a command prompt on either Windows NT or Unix, type:

telnet 25

Note:-
- is the local smtp gateway name.
- 25 is the SMTP communication port


2. A telnet session should open with a response from SMTP:
response from smtp ---> 220 ukxxx1 Sendmail SMI-8.6/SMI-SVR4 ready at

note: make sure echo is on the terminal

3. Now introduce the client machine to the server by typing:
helo


If a message is returned ---> 501 helo requires domain address

Then type: ---> helo mx.gmail.com

(substitute mx.gmail.com with the local domain of the SMTP server)


4. Tell the SMTP Gateway who the test email is coming fro by typing:

-------> mail from: emailid@domain

If a message is returned ---> 501 Syntax error in return path

Then type: ---> mail from:

NOTE: Include the angle brackets around the address.

A response from smtp ---> 250 emailid@domain... Sender ok


5. Tell the SMTP Gateway who to send the test email to by typing:

--------> rcpt to: emailid@domain
or
--------> rcpt to:

A response from smtp ---> 250 emailid@domain... Recipient ok


6. Tell the SMTP Gateway what type of information is being sent by typing:
-------> data

A response from smtp ---> 354 Enter mail, end with "." on a line
by itself

7. Enter the test message and remember to close the email with a dot "."
Type ---> Subject: SMTP Test
Hello this is an smtp test for EM.
.

A response from smtp ---> 250 PAA15913 Message accepted for delivery

8. End the SMTP connection session by typing:
--------> quit
response from smtp ---> 221 ukxxx1 closing connection
The connection has been terminated.

No comments: