解决阿里云postfix没法发送邮件问题

启动postfix报错以下ide

sendmail: fatal: parameter inet_interfaces: no local interface found for ::1
报错和IPv6有关,解决办法就是让postfix只用IPv4。
编辑文件:post

/etc/postfix/main.cf
rest

inet_protocols = all
改为ip

inet_protocols = ipv4
修改后执行it

service postfix restartclass