今天在生產環境上安裝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
搞掂收工