sendmail邮件服务测试

引用
[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.


看一下是否收到信:用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                    (退出)


也可以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


这时如果可以看到邮件,该MTA就可以正常工作了!

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值