引用
[root@smtp root]# telnet smtp.sina.com 25
Trying 192.168.1.10...
Connected to smtp.sina.com.
Escape character is '^]'.
220 dns.sina.com ESMTP Sendmail 8.12.8/8.12.8; Thu, 18 Jan 2007 12:29:20 +0800
helo root
250 dns.sina.com Hello pop.yahoo.com [192.168.1.40], pleased to meet you
mail from:root@sina.com (发信人地址)
250 2.1.0 root@sina.com... Sender ok
rcpt to:root@sina.com (收信人地址)
250 2.1.5 root@sina.com... Recipient ok
data (邮件内容)
354 Enter mail, end with "." on a line by itself
Testmailxxxxxx
. (以”.”结束)
250 2.0.0 l0I4TKnT001216 Message accepted for delivery
quit (退出)
221 2.0.0 dns.sina.com closing connection
Connection closed by foreign host.
Trying 192.168.1.10...
Connected to smtp.sina.com.
Escape character is '^]'.
220 dns.sina.com ESMTP Sendmail 8.12.8/8.12.8; Thu, 18 Jan 2007 12:29:20 +0800
helo root
250 dns.sina.com Hello pop.yahoo.com [192.168.1.40], pleased to meet you
mail from:root@sina.com (发信人地址)
250 2.1.0 root@sina.com... Sender ok
rcpt to:root@sina.com (收信人地址)
250 2.1.5 root@sina.com... Recipient ok
data (邮件内容)
354 Enter mail, end with "." on a line by itself
Testmailxxxxxx
. (以”.”结束)
250 2.0.0 l0I4TKnT001216 Message accepted for delivery
quit (退出)
221 2.0.0 dns.sina.com closing connection
Connection closed by foreign host.
看一下是否收到信:用mail收信
引用
[root@dns /]# mail (收信)
Mail version 8.1 6/6/93. Type ? for help.
"/var/spool/mail/root": 1 message 1 new
>N 1 root@sina.com Tue Sep 18 13:53 11/367 (显示有一封信)
& 1 (查看)
Message 1:
From root@sina.com Tue Sep 18 13:53:51 2007
Date: Tue, 18 Sep 2007 13:53:07 +0800
From: root <root@sina.com>
Hahaha (邮件内容)
& q (退出)
Mail version 8.1 6/6/93. Type ? for help.
"/var/spool/mail/root": 1 message 1 new
>N 1 root@sina.com Tue Sep 18 13:53 11/367 (显示有一封信)
& 1 (查看)
Message 1:
From root@sina.com Tue Sep 18 13:53:51 2007
Date: Tue, 18 Sep 2007 13:53:07 +0800
From: root <root@sina.com>
Hahaha (邮件内容)
& q (退出)
也可以telnet 192.168.1.2 110来收信
引用
[root@rhel-1 ~]# telnet 192.168.1.10 110
Trying 192.168.1.10...
Connected to mail.rhce.com (192.168.1.10).
Escape character is '^]'.
+OK dovecot ready.
user sina (输入用户名)
+OK
pass 123 (输入密码)
+OK Logged in.
Stat (查看邮件)
+OK 1 893
top 1 893 (查看内容)
+OK
Return-Path: <sina@sina.com>
Received: from server (www.rhce.com [192.168.1.10])
by localhost.localdomain (8.13.1/8.13.1) with SMTP id k8D3TqsT002688
for <test2@rhce.com>; Wed, 13 Sep 2006 11:29:52 +0800
Message-ID: <001801c6d6e2$e92448a0$0701a8c0@server>
From: "admin" <sina@sina.com>
To: <sina@sina.com>
Subject:
Date: Wed, 13 Sep 2006 11:15:48 +0800
MIME-Version: 1.0
Content-Type: text/plain;
charset="gb2312"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.3790.0
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from base64 to 8bit by localhost.localdomain id k8D3TqsT002688
X-IMAPbase: 1158118231 1
Status: O
X-UID: 1
Content-Length: 13
X-Keywords:
thist a test (邮件内容)
.
Quit (退出)
+OK Logging out.
Connection closed by foreign host.
[root@smtp root]# mail
Trying 192.168.1.10...
Connected to mail.rhce.com (192.168.1.10).
Escape character is '^]'.
+OK dovecot ready.
user sina (输入用户名)
+OK
pass 123 (输入密码)
+OK Logged in.
Stat (查看邮件)
+OK 1 893
top 1 893 (查看内容)
+OK
Return-Path: <sina@sina.com>
Received: from server (www.rhce.com [192.168.1.10])
by localhost.localdomain (8.13.1/8.13.1) with SMTP id k8D3TqsT002688
for <test2@rhce.com>; Wed, 13 Sep 2006 11:29:52 +0800
Message-ID: <001801c6d6e2$e92448a0$0701a8c0@server>
From: "admin" <sina@sina.com>
To: <sina@sina.com>
Subject:
Date: Wed, 13 Sep 2006 11:15:48 +0800
MIME-Version: 1.0
Content-Type: text/plain;
charset="gb2312"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.3790.0
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from base64 to 8bit by localhost.localdomain id k8D3TqsT002688
X-IMAPbase: 1158118231 1
Status: O
X-UID: 1
Content-Length: 13
X-Keywords:
thist a test (邮件内容)
.
Quit (退出)
+OK Logging out.
Connection closed by foreign host.
[root@smtp root]# mail
这时如果可以看到邮件,该MTA就可以正常工作了!