Email Smtp Manual

Manual SMTP Session

Auszug aus: http://www.keylabs.com/news/links/news_21217AdToolbox.pdf

This one is more of a technique than a tool but helpful nonetheless for its intended purpose. Mail flows through the Internet using the Simple Mail Transport Protocol (SMTP). For troubleshooting Internet e-mail, a manual SMTP session is the best way to isolate the problem because you get to see exactly what is going on. The first step is to use nslookup or dig to find out the name and IP address of a mail exchanger for the destination domain. Pretend for a minute that the "mx" query mentioned above for somedomain.com came back with a name of mailhub.somedomain.com and an IP address of A.B.C.D. IP addresses are really numbers (not letters) but you understand the idea. From there a network administrator would telnet to port 25 on the server at A.B.C.D. If everything is working the administrator would see a "220" message, the friendly name of the mail exchanger, whether SMTP or ESMTP is supported, and the name and version of mail exchanger software running on the server. The session below illustrates how to send a mail message manually. I know the thought would never crossed your mind, but please note that this is for educational purposes only and not for sending funny e-mail messages to your friends from famous people. The parts in bold are what you would need to type.

root@Linux:/ > telnet mailhub.somedomain.com 25
Trying A.B.C.D...
Connected to mailhub.somedomain.com.
Escape character is '^]'.
220 mailhub.somedomain.com ESMTP Exim 4.04 Wed, 13 Nov 2002 16:27:42 -0700
helo someotherdomain.com
250 mailhub.somedomain.com Hello someotherdomain.com [E.F.G.H]
mail from:<Jim@someotherdomain.com>
250 OK
rcpt to:<Joe@somedomain.com>
250 Accepted
data
354 Enter message, ending with "." on a line by itself
Subject:Test Message
This is a test message.
.
250 OK id=18C6vd-0005Ey-00
quit
221 mailhub.somedomain.com closing connection
Connection closed by foreign host
root@Linux:/ >

Joe@somedomain.com should get an e-mail from Jim@someotherdomain.com or you will have to do more troubleshooting to isolate the problem.