send-mail: IPv6 support is disabled

今天在生產環境上安裝nagios時,發現一個問題,主機出問題了,不會發送郵件。於是用echo "hello" | mail -s "FUCK" [email protected]

報了一下錯

send-mail: warning: inet_protocols: IPv6 support is disabled: Address family not supported by protocol
send-mail: warning: inet_protocols: configuring for IPv4 support only

修改方法:

/usr/sbin/postconf | grep inet_protocols  --查看當前的inet_protocols 

inet_protocols = all

vi /etc/postfix/main.cf

inet_protocols = all

改爲inet_protocols = ipv4

重啓/etc/init.d/postfix restart

搞掂收工

 

發佈了65 篇原創文章 · 獲贊 0 · 訪問量 7萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章