mail发邮件报错 "send-mail: fatal: parameter inet_interfaces: no local interface found for ::1"

 

发送邮件:

[root@itfswelog123]# echo '测试邮件标题' | mail -s "数据库挂啦、挂啦、起床啦 "   xx@163.com

出现异常:

[root@itfswelog123]# send-mail: fatal: parameter inet_interfaces: no local interface found for ::1

 

查看centos中的postfix日志

more  /var/log/maillog

postfix: fatal: parameter inet_interfaces: no local interface found for ::1

 

解决方法:

vim  /etc/postfix/main.cf

 

将:

inet_interfaces = localhost

inet_protocols = all

改成:

inet_interfaces = all

inet_protocols = all

 

inet_interfaces 参数指定postfix系统监听的网络接口。缺省地,postfix监听所有的网络接口。如果你的postfix运行在一个虚拟的ip地址上,则必须指定其监听的地址。如:

inet_interfaces = all 
inet_interface = 192.168.1.1


重新启动

service postfix start

 

然后测试就可以了

posted @ 2018-10-24 13:27  天宇星空  阅读(5090)  评论(0编辑  收藏  举报