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

 

发送邮件:

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

出现异常:

[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

扫描二维码关注公众号,回复: 3704687 查看本文章

将:

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

然后测试就可以了

猜你喜欢

转载自www.cnblogs.com/byfboke/p/9843069.html