发送邮件:

[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

 

然后测试就可以了

相关文章:

  • 2021-08-12
  • 2021-06-07
  • 2021-06-14
  • 2022-12-23
  • 2021-10-26
  • 2022-01-09
  • 2022-12-23
猜你喜欢
  • 2021-05-20
  • 2021-06-03
  • 2022-12-23
  • 2021-05-20
  • 2022-12-23
  • 2021-04-15
  • 2021-09-16
相关资源
相似解决方案