linux 不改主机名mail,linuxmail命令发送邮件失败的解决

满意答案

使用linux自带的邮件功能测试邮件发送功能如下:$ mail -s test xxx@163.comsldkfjlskdjf[CTRL+D]cc:有时会出再提示:You have a new mail in /var/spool/mail/root并且在邮箱中看不到邮件;解决办法:1. 查看出错的日志$ tail -n 50 /var/spool/mail/rootFrom MAILER-DAEMON@ltv_73 Thu Dec 12 11:35:28 2013Return-Path: Received: from localhost (localhost)by ltv_73 (8.13.8/8.13.8) id rBC3ZSPe006446;Thu, 12 Dec 2013 11:35:28 +0800Date: Thu, 12 Dec 2013 11:35:28 +0800From: Mail Delivery Subsystem Message-Id: <201312120335.rBC3ZSPe006446@ltv_73>To: MIME-Version: 1.0Content-Type: multipart/report; report-type=delivery-status;boundary=rBC3ZSPe006446.1386819328/ltv_73Subject: Returned mail: see transcript for detailsAuto-Submitted: auto-generated (failure)This is a MIME-encapsulated message--rBC3ZSPe006446.1386819328/ltv_73The original message was received at Thu, 12 Dec 2013 11:35:18 +0800from 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: SIZE=519<<< 530 5.7.1 Client was not authenticated554 5.0.0 Service unavailable--rBC3ZSPe006446.1386819328/ltv_73Content-Type: message/delivery-statusReporting-MTA: dns; ltv_73Received-From-MTA: DNS; sohu_41_154Arrival-Date: Thu, 12 Dec 2013 11:35:18 +0800Final-Recipient: RFC822; xxx@163.comAction: failedStatus: 5.7.1Diagnostic-Code: SMTP; 530 5.7.1 Client was not authenticatedLast-Attempt-Date: Thu, 12 Dec 2013 11:35:28 +08002. 修改DNS$ vim /etc/resolv.conf修改成可用的DNS,这个地方的修改保存后即生效;3. 修改主机名【也可不做这一步】$ sysctl kernel.hostname=newhostname4. 重启邮件服务$ service sendmail restart

00分享举报

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值