今天在弄一個郵件通知的時候,忽然發現連最基本的郵件都發不出去,報錯了vim
[root@xhk ~]# echo '標題' | mail -s "內容" xxxxxxx@qq.comcentos
出現異常:
[root@xhk ~]# send-mail: fatal: parameter inet_interfaces: no local interface found for ::1ide
查看centos中的postfix日誌
more /var/log/maillog
postfix: fatal: parameter inet_interfaces: no local interface found for ::1post
vim /etc/postfix/main.cfrest
能夠看到這裏的配置文件配置的是localhost,問題就出如今這裏
inet_interfaces = localhost
inet_protocols = all日誌
咱們把他改爲
inet_interfaces = all
inet_protocols = allblog
從新啓動郵件服務
[root@xhk ~]# systemctl restart postfixit
再次發送郵件,成功!!!class