linuxmail命令发送邮件失败的解决
使用linux自带的邮件功能测试邮件发送功能如下:
$ mail -s test xxx@163.com
sldkfjlskdjf[CTRL+D]
cc:
有时会出再提示:
You have a new mail in /var/spool/mail/root
并且在邮箱中看不到邮件;
解决办法:
1. 查看出错的日志
$ tail -n 50 /var/spool/mail/root
From MAILER-DAEMON@ltv_73 Thu Dec 12 11:35:28 2013
Return-Path: <MAILER-DAEMON@ltv_73>
Received: from localhost (localhost)
by ltv_73 (8.13.8/8.13.8) id rBC3ZSPe006446;
Thu, 12 Dec 2013 11:35:28 +0800
Date: Thu, 12 Dec 2013 11:35:28 +0800
From: Mail Delivery Subsystem <MAILER-DAEMON@ltv_73>
Message-Id: <201312120335.rBC3ZSPe006446@ltv_73>
To: <root@ltv_73>
MIME-Version: 1.0
Content-Type: multipart/report; report-type=delivery-status;
boundary="rBC3ZSPe006446.1386819328/ltv_73"
Subject: Returned mail: see transcript for details
Auto-Submitted: auto-generated (failure)
This is a MIME-encapsulated message
--rBC3ZSPe006446.1386819328/ltv_73
The original message was received at Thu, 12 Dec 2013 11:35:18 +0800
from 41_154 [127.0.0.1]
----- The following addresses had permanent fatal errors -----
(reason: 530 5.7.1 Client was not authenticated)
----- Transcript of session follows -----
... while talking to mail.163.com.:
>>> MAIL From:<root@ltv_73> SIZE=519
<<< 530 5.7.1 Client was not authenticated
554 5.0.0 Service unavailable
--rBC3ZSPe006446.1386819328/ltv_73
Content-Type: message/delivery-status
Reporting-MTA: dns; ltv_73
Received-From-MTA: DNS; sohu_41_154
Arrival-Date: Thu, 12 Dec 2013 11:35:18 +0800
Final-Recipient: RFC822; xxx@163.com
Action: failed
Status: 5.7.1
Diagnostic-Code: SMTP; 530 5.7.1 Client was not authenticated
Last-Attempt-Date: Thu, 12 Dec 2013 11:35:28 +0800
2. 修改DNS
$ vim /etc/resolv.conf
修改成可用的DNS,这个地方的修改保存后即生效;
3. 修改主机名【也可不做这一步】
$ sysctl kernel.hostname=newhostname
4. 重启邮件服务
$ service sendmail restart
$ mail -s test xxx@163.com
sldkfjlskdjf[CTRL+D]
cc:
有时会出再提示:
You have a new mail in /var/spool/mail/root
并且在邮箱中看不到邮件;
解决办法:
1. 查看出错的日志
$ tail -n 50 /var/spool/mail/root
From MAILER-DAEMON@ltv_73 Thu Dec 12 11:35:28 2013
Return-Path: <MAILER-DAEMON@ltv_73>
Received: from localhost (localhost)
by ltv_73 (8.13.8/8.13.8) id rBC3ZSPe006446;
Thu, 12 Dec 2013 11:35:28 +0800
Date: Thu, 12 Dec 2013 11:35:28 +0800
From: Mail Delivery Subsystem <MAILER-DAEMON@ltv_73>
Message-Id: <201312120335.rBC3ZSPe006446@ltv_73>
To: <root@ltv_73>
MIME-Version: 1.0
Content-Type: multipart/report; report-type=delivery-status;
boundary="rBC3ZSPe006446.1386819328/ltv_73"
Subject: Returned mail: see transcript for details
Auto-Submitted: auto-generated (failure)
This is a MIME-encapsulated message
--rBC3ZSPe006446.1386819328/ltv_73
The original message was received at Thu, 12 Dec 2013 11:35:18 +0800
from 41_154 [127.0.0.1]
----- The following addresses had permanent fatal errors -----
(reason: 530 5.7.1 Client was not authenticated)
----- Transcript of session follows -----
... while talking to mail.163.com.:
>>> MAIL From:<root@ltv_73> SIZE=519
<<< 530 5.7.1 Client was not authenticated
554 5.0.0 Service unavailable
--rBC3ZSPe006446.1386819328/ltv_73
Content-Type: message/delivery-status
Reporting-MTA: dns; ltv_73
Received-From-MTA: DNS; sohu_41_154
Arrival-Date: Thu, 12 Dec 2013 11:35:18 +0800
Final-Recipient: RFC822; xxx@163.com
Action: failed
Status: 5.7.1
Diagnostic-Code: SMTP; 530 5.7.1 Client was not authenticated
Last-Attempt-Date: Thu, 12 Dec 2013 11:35:28 +0800
2. 修改DNS
$ vim /etc/resolv.conf
修改成可用的DNS,这个地方的修改保存后即生效;
3. 修改主机名【也可不做这一步】
$ sysctl kernel.hostname=newhostname
4. 重启邮件服务
$ service sendmail restart
>更多相关文章
- 11-131分钟学会U盘启动安装Linux系统
- 11-13克隆MAC地址来绕过强制门户
- 11-13Linux运维常见故障及处理的 32 个锦囊妙计
- 11-13如何快速以管理员权限运行Linux命令?
- 11-13超全面的Linux应急响应技巧
- 11-136 款面向 Linux 用户的开源绘图应用程序
首页推荐
佛山市东联科技有限公司一直秉承“一切以用户价值为依归
- 01-11全球最受赞誉公司揭晓:苹果连续九年第一
- 12-09罗伯特·莫里斯:让黑客真正变黑
- 12-09谁闯入了中国网络?揭秘美国绝密黑客小组TA
- 12-09警示:iOS6 惊现“闪退”BUG
- 12-25优酷推出U镜到底等直播功能 已应用在羽毛球
- 12-25百川智能正式发布全链路领域增强大模型
- 12-25SHEIN4家仓储物流园获“零废工厂”认证
- 12-25西方博主在TikTok上展现中国风貌,“China
- 12-05亚马逊推出新一代基础模型 任意模态生成大模
相关文章
24小时热门资讯
24小时回复排行
热门推荐
最新资讯
操作系统
黑客防御