Skip to content

用Telnet测试SMTP服务

2005/04/22
by

【例】
<Server>: 220 mySMTPServer Microsoft ESMTP MAIL Service, Version: 5.0.2195.6713
ready at  Wed, 7 Apr 2004 14:32:17 ⿢0400

<Client>:HELO
<Server>: 250 mySMTPServer Hello [192.168.1.2]
<Client>:MAIL FROM: SeanAlex@Rogers.com
<Server>: 250 2.1.0 SeanAlex@Rogers.com….Sender OK
<Client>:RCPT TO: seanalex@hotmail.com
<Server>: 250 2.1.5 seanalex@hotmail.com….Recipient OK
<Client>:DATA
<Server>: 354 Enter mail, end with "." on a line by itself

<Client>:Date: 7 Apr 04 14:33:44
<Client>:From: Sean Alexander
<Client>:Subject:  This is a test message
<Client>:To: My Other Test Account
<Client>:
<Client>:Hi:
<Client>:      This is a test message!
<Client>:Sean.
<Client>:.
<Server>:250 2.6.0 < mySMTPServerLLsa1jAV9t00000008@ mySMTPServer>
 Queued mail for delivery
<Client>:QUIT
<Server>:221 2.0.0 mySMTPServer Service closing transmission channel

【注】 位于http://msdn.microsoft.com/canada/btl/may_winner.asp的原文遗漏了上面标为棕色的三行

【解析】

  1. 在Windows命令行里键入Telnet<回车>.
  2. 在telnet提示符下键入set LocalEchoset Local_Echo<回车>;
    再键入open <计算机名> 25<回车>;
    可以看到服务器应答: 220 computername.microsoft.com ESMTP Server (Microsoft Exchange Internet Mail Service 5.5.2651.58) ready.
  3. 键入: helo me<回车>;
    服务器应答: 250 OK.
  4. 键入: mail from: email@domain.com<回车>;
    服务器应答: 250 OK – mail from email@domain.com.
  5. 键入: rcpt to: youremail@yourdomain.com<回车>;
    服务器应答: 250 OK – Recipient youremail@yourdomain.com.
  6. 键入: Data<回车>;
    服务器应答: 354 Send data.
  7. 键入: Subject: This is a test<回车><回车>, (两次).
  8. 键入: Testing<回车>.
  9. <回车>.<回车>;
     服务器应答: 250 OK.
  10. 键入: quit<回车>;
    服务器应答: 221 Closing Port / Mail queued for delivery.

参考MS/KB: 286421, 323350.

No comments yet

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: