在一台沒有 VPS 關閉了 IPv6 後, 原來正常使用的 Postfix 不能使用, 重新啟動也失敗, 先查看一下錯誤信息:
- # systemctl status postfix
看到以下錯誤:
fatal: parameter inet_interfaces: no local interface found for ::1
看來是關閉了 IPv6 導致這個問題.
解決方法
開啟 Postfix 的設定檔:
- # vi /etc/postfix/main.cf
找到
inet_interfaces = localhost
改成
inet_protocols = all
儲存變更後重新啟動 Postfix 便可以解決:
- # systemctl start postfix