发送邮件:
[root@iZ23whn33jnZ log]# echo '这是邮件标题' | mail -s "这是邮件内容" 9379963xx@qq.com
出现异常:
[root@iZ23whn33jnZ log]# 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
vi /etc/postfix/main.cf
发现配置为:
inet_interfaces = localhost
inet_protocols = all
改成:
inet_interfaces = all
inet_protocols = all
重新启动
service postfix start
OK!
本文解决在CentOS系统中使用Postfix发送邮件时遇到的'parameterinet_interfaces:nolocalinterfacefoundfor::1'错误。通过修改配置文件main.cf中的inet_interfaces设置,从localhost更改为all,成功解决了邮件发送失败的问题,并通过重新启动postfix服务验证了解决方案。
3万+





