关于使用mail命令发送邮件报错:Address family not supported by protocol
作者:互联网
今天在一台linux主机下在使用mail命令发送邮件时,报如下错误:
send-mail: warning: inet_protocols: disabling IPv6 name/address support: Address family not supported by protocol
postdrop: warning: inet_protocols: disabling IPv6 name/address support: Address family not supported by protocol
根据报错信息,应该是与postfix服务器的配置文件中的inet_protocols有关系,于是找到其主配置文件 /etc/postfix/main.cf
发现inet_protocols的值被配置成了all (想起应该是系统升级后,将postfix也升级了,也覆盖了之前的配置),
# Enable IPv4, and IPv6 if supported inet_protocols = all
解决方法(根据自己的服务器所在环境而修改):
[qq_5201351@localhost ~]$ grep -E "^inet_protocols|^relayhost" /etc/postfix/main.cf inet_protocols = ipv4 relayhost = 10.10.1.130:25
最后让postfix重加载一下配置,发送邮件,测试,问题解决~、
尊重别人的劳动成果 转载请务必注明出处:https://www.cnblogs.com/5201351/p/15500154.html
标签:protocol,family,postfix,supported,报错,inet,Address,protocols 来源: https://www.cnblogs.com/5201351/p/15500154.html