作者:粉奈訫 | 来源:互联网 | 2014-05-28 08:57
1.mail命令发邮件echobbbbbbbb|mail-saaaaahello@139.com2.发送不成功,查看logDec516:44:28intranetsendmail[9891]:qB58iSe0009891:tohello@139.com,ctladdrroot(0/0),delay00:00:00,xd
1.mail 命令发邮件
echo "bbbbbbbb"|mail -s "aaaaa" hello@139.com
2.发送不成功,查看log
Dec 5 16:44:28 intranet
sendmail[9891]: qB58iSe0009891:
to= hello@139.com, ctladdr=root (0/0), delay=00:00:00,
xdelay=00:00:00, mailer=relay, pri=30039, relay=[127.0.0.1]
[127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by
[127.0.0.1]
此信息说明是被自己给拒绝了,主要原因是hostname和hosts文件配置不一样造成的,请保证配置正确:如下
cat /etc/hosts
127.0.0.1
localhost.localdomain localhost
cat /etc/sysconfig/network
HOSTNAME=localhost.localdomain