今天在弄一个邮件通知的时候, 突然发现连最基本的邮件都发不出去, 报错了
[root@xhk ~]# echo 标题 | mail -s "内容" xxxxxxx@qq.com
出现异常:
[root@xhk ~]# 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
可以看到这里的配置文件配置的是 localhost, 问题就出现在这里
- inet_interfaces = localhost
- inet_protocols = all
我们把他改成
- inet_interfaces = all
- inet_protocols = all
重新启动邮件服务
[root@xhk ~]# systemctl restart postfix
再次发送邮件, 成功!!!
来源: http://www.bubuko.com/infodetail-2536947.html