Postfix的一次报错处理
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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的一次报错处理的主要内容,如果未能解决你的问题,请参考以下文章
CentOS7 yum的一次报错" 14: curl#56 - "Recv failure: Connection reset by peer" "
CentOS7 yum的一次报错" 14: curl#56 - "Recv failure: Connection reset by peer" "