请教 mail 发送邮件出错!!

发布于 2022-10-02 19:34:20 字数 3128 浏览 37 评论 0

我想利用mail命令发送文本到我的邮箱,可是执行的时候出错了,请各位高手指点:
# cat a.txt
adafdas
# cat a.txt | mail -s "aa" aaa@21cn.com

#cat /var/spool/mail/root
From MAILER-DAEMON@hpserver  Mon Jan 17 17:53:07 2005
Return-Path: <MAILER-DAEMON@hpserver>;
Received: from localhost (localhost)
        by hpserver (8.12.11/8.12.11) id j0H9r7gc001851;
        Mon, 17 Jan 2005 17:53:07 +0800
Date: Mon, 17 Jan 2005 17:53:07 +0800
From: Mail Delivery Subsystem <MAILER-DAEMON@hpserver>;
Message-Id: <200501170953.j0H9r7gc001851@hpserver>;
To: <root@hpserver>;
MIME-Version: 1.0
Content-Type: multipart/report; report-type=delivery-status;
        boundary="j0H9r7gc001851.1105955587/hpserver"
Subject: Returned mail: see transcript for details
Auto-Submitted: auto-generated (failure)

This is a MIME-encapsulated message

--j0H9r7gc001851.1105955587/hpserver

The original message was received at Mon, 17 Jan 2005 17:53:02 +0800
from local [127.0.0.1]

   ----- The following addresses had permanent fatal errors -----
<aaa@21cn.com>;
    (reason: 554 Connection refused(mx). MAIL FROM [root@hpserver] mismatches client IP [61.51.130.253].)

   ----- Transcript of session follows -----
... while talking to mta2.21cn.com.:
>;>;>; MAIL From:<root@hpserver>;

<<< 554 Connection refused(mx). MAIL FROM [root@hpserver] mismatches client IP [61.51.130.253].
554 5.0.0 Service unavailable
--j0H9r7gc001851.1105955587/hpserver
Content-Type: message/delivery-status

Reporting-MTA: dns; hpserver
Received-From-MTA: DNS; local
Arrival-Date: Mon, 17 Jan 2005 17:53:02 +0800

Final-Recipient: RFC822; aaa@21cn.com
Action: failed
Status: 5.0.0
Diagnostic-Code: SMTP; 554 Connection refused(mx). MAIL FROM [root@hpserver] mismatches client IP [61.51.130.253].
Last-Attempt-Date: Mon, 17 Jan 2005 17:53:07 +0800

--j0H9r7gc001851.1105955587/hpserver
Content-Type: message/rfc822

Return-Path: <root@hpserver>;
Received: from hpserver (local [127.0.0.1])
        by hpserver (8.12.11/8.12.11) with ESMTP id j0H9r2gc001849
        for <aaa@21cn.com>;; Mon, 17 Jan 2005 17:53:02 +0800
Received: (from root@localhost)
        by hpserver (8.12.11/8.12.11/Submit) id j0H9r2MF001830
        for aaa@21cn.com; Mon, 17 Jan 2005 17:53:02 +0800
Date: Mon, 17 Jan 2005 17:53:02 +0800
From: root <root@hpserver>;
Message-Id: <200501170953.j0H9r2MF001830@hpserver>;
To:aaa@21cn.com
Subject: aa

adfadflajfa

--j0H9r7gc001851.1105955587/hpserver--

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

悲歌长辞 2022-10-09 19:34:20

大家帮我看看:为什么会有这个错误,怎么解决:
(reason: 554 Connection refused(mx). MAIL FROM [root@hpserver] mismatches client IP [61.51.130.253].)
现在我的sendmail是开着的

无人问我粥可暖 2022-10-09 19:34:20

21cn把你的信当作垃圾邮件退信了
事实上国内的ICP邮箱收信规则都是粉BT的
大多数需要mx验证,最郁闷的是sina的信箱,需要域名反解~-~
找个yahoo或者gmail的邮箱试一下,你的配置应该没问题了

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文