Real domain name required for sender address



从114服务器每天发邮件给,通知一下硬盘使用情况。下面是脚本里的一条语句。

#df -h |mutt -s "`ifconfig  |grep Bcast |head -1`"

报错:

寄送讯息出现错误,子程序已结束 65 (Data format error.)。
无法寄出信件。

在其他服务器上执行,没有问题,都能正常发送邮件。但是在114上怎么都不行。

查看/var/log/maillog ,报日志如下 :

Feb 13 15:02:29 server114 sendmail[31056]: q1D72T8m031056: from=root, size=899, class=0, nrcpts=1, msgid=<>,
Feb 13 15:02:29 server114 sendmail[31057]: q1D72T5j031057: ruleset=check_mail, arg1=<>, relay=localhost [127.0.0.1] (may be forged), reject=553 5.5.4 <>...Real domain name required for sender address
Feb 13 15:02:29 server114 sendmail[31056]: q1D72T8m031056: , ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30899, relay=[127.0.0.1] [127.0.0.1], dsn=5.6.0, stat=Data format error
Feb 13 15:02:29 server114 sendmail[31056]: q1D72T8m031056: q1D72T8n031056: DSN: Data format error
Feb 13 15:02:30 server114 sendmail[31057]: q1D72T5j031057: from=<>, size=899, class=0, nrcpts=0, proto=ESMTP, daemon=MTA, relay=localhost [127.0.0.1] (may be forged)
Feb 13 15:02:30 server114 sendmail[31057]: q1D72T5k031057: from=<>, size=2949, class=0, nrcpts=1, msgid=<>, bodytype=8BITMIME, proto=ESMTP, daemon=MTA, relay=localhost [127.0.0.1] (may be forged)
Feb 13 15:02:30 server114 sendmail[31056]: q1D72T8n031056: to=root, delay=00:00:01, xdelay=00:00:00, mailer=relay, pri=31923, relay=[127.0.0.1], dsn=2.0.0, stat=Sent (q1D72T5k031057 Message accepted for delivery)
Feb 13 15:02:30 server114 sendmail[31060]: q1D72T5k031057: to=<>, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=33170, dsn=2.0.0, stat=Sent

想必是和hostname有关。检查:

[root@server114 ~]# cat /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=localhost.localdomain

修改为如下内容:

[root@server114 ~]# cat /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=server114

退出,重新登陆,再次发送,还是不行。

检查:

[root@server114 ~]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
192.168.0.114   localhost.localdomain localhost server114
127.0.0.1       localhost
[root@server114 ~]#

修改为如下:

[root@server114 ~]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
192.168.0.114   server114.localdomain   server114
127.0.0.1       localhost
[root@server114 ~]#

退出、登录,再发送,ok。(注意:标红色的部分,不能有下划线,如果有,则发不了邮件。经测试,减号是可以的)

发送后的日志:
Feb 13 15:50:00 server114 sendmail[31918]: q1D7o0sI031918: from=root, size=895, class=0, nrcpts=1, msgid=<>,
Feb 13 15:50:02 server114 sendmail[31919]: q1D7o0mo031919: from=<>, size=1053, class=0, nrcpts=1, msgid=<>, proto=ESMTP, daemon=MTA, relay=localhost [127.0.0.1]
Feb 13 15:50:02 server114 sendmail[31918]: q1D7o0sI031918: , ctladdr=root (0/0), delay=00:00:02, xdelay=00:00:02, mailer=relay, pri=30895, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (q1D7o0mo031919 Message accepted for delivery)
Feb 13 15:50:03 server114 sendmail[31921]: STARTTLS=client, relay=mail.btest.cn., version=TLSv1/SSLv3, verify=FAIL, cipher=DHE-RSA-AES256-SHA, bits=256/256
Feb 13 15:50:03 server114 sendmail[31921]: q1D7o0mo031919: to=<>, delay=00:00:02, xdelay=00:00:01, mailer=esmtp, pri=121053, relay=mail.btest.cn. [219.232.241.42], dsn=2.0.0, stat=Sent (Ok: queued as 10589DB9219)

 

如下设置是能发送的:

[root@hhh_x_g_tomora ~]# df -h |mutt -s "`ifconfig  |grep Bcast |head -1`"
[root@hhh_x_g_tomora ~]# cat /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=hhh_x_g_tomora
[root@hhh_x_g_tomora ~]#
[root@hhh_x_g_tomora ~]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
192.168.0.2             hhh_x_g_tomora       testt.localdomain testt
127.0.0.1       localhost
[root@hhh_x_g_tomora ~]#
[root@hhh_x_g_tomora ~]# hostname
hhh_x_g_tomora

[root@hhh_x_g_tomora ~]#




更多参考:

AIX mount RedHat的NFS

误删除/dev/dsk 和/dev/rdsk 下的文件怎么办?

unary operator expected

bash: /root/.bash_profile: line 15: syntax error: unexpected end of file

Linux下如何查看文件秒级修改及访问时间

EM乱码解决

linux里端口转发

windows xp 下使用FileZilla密钥

java.net.SocketException: Too many open files 问题的解决办法

UNExcepted inconsistency; run fsck manually

如何修改linux的mac地址?

mysqldump: Got error: 1066: Not unique table/alias

rsync详解一

rsync详解二

更改mysql的默认安装目录

httpd: apr_sockaddr_info_get() failed for centos1113

Real domain name required for sender address

Connection refused by [127.0.0.1]

MySQL bin_log文件占用空间太大

Centos 5 多路径配置步骤

rpc mount export: RPC: Unable to receive; errno = No route to host

nohup和screen的比较

vmware workstation 8 共享磁盘




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

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值