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

 

然后測試就可以了


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM