1. 程式人生 > >Postfix的一次報錯處理

Postfix的一次報錯處理

postfix

配置zabbix監控時,查看/var/log/maillog日誌,發現如下報錯:
Apr 30 22:39:09 ops-monitor-01 postfix/sendmail[346]: fatal: parameter inet_interfaces: no local interface found for ::1
初步懷疑是ipv6的問題:

# ip add list
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
    link/ether 00:16:3e:0e:08:da brd ff:ff:ff:ff:ff:ff
    inet 172.20.207.171/20 brd 172.20.207.255 scope global dynamic eth0
       valid_lft 314283649sec preferred_lft 314283649sec

果然,阿裏雲上ipv6應該是關閉狀態,然後我們查看下配置文件的信息:

# vim /etc/postfix/main.cf 

# See also the proxy_interfaces parameter, for network addresses that
# are forwarded to us via a proxy or network address translator.
#
# Note: you need to stop/start Postfix when this parameter changes.
#
#inet_interfaces = all
#inet_interfaces = $myhostname
#inet_interfaces = $myhostname, localhost
inet_interfaces = localhost

# Enable IPv4, and IPv6 if supported
# inet_protocols = all
# 將接口網絡協議改為下面的ipv4
inet_protocols = ipv4

最後,我們重啟下服務:

systemctl restart  postfix

問題得到解決

Postfix的一次報錯處理