,

关于禁用IPv6引起的故障

一台测试用的邮件服务器ContOS6.6,修改/etc/modprobe.d/dist.conf添加以下两行内容以禁用IPv6,然后重启

166 alias net-pf-10 off
167 alias ipv6 off

重启完之后发现dovecot服务启不来了,查看boot.log发现还有ip6tables也没有启用,这个好说,禁用IPv6了IPv6的防火墙也不需要了,chkconfig ip6tables off就行了。

在boot.log中看到dovecot相关的错误日志如下:

Dovecot Imap:Error: socket() failed: Address family not supported by protocol
Error: service(managesieve-login): listen([::], 4190) failed: Address family not supported by protocol
Error: socket() failed: Address family not supported by protocol
Error: service(pop3-login): listen([::], 110) failed: Address family not supported by protocol
Error: socket() failed: Address family not supported by protocol
Error: service(pop3-login): listen([::], 995) failed: Address family not supported by protocol
Error: socket() failed: Address family not supported by protocol
Error: service(lmtp): listen([::], 24) failed: Address family not supported by protocol
Error: socket() failed: Address family not supported by protocol
Error: service(imap-login): listen([::], 143) failed: Address family not supported by protocol
Error: socket() failed: Address family not supported by protocol
Error: service(imap-login): listen([::], 993) failed: Address family not supported by protocol
Fatal: Failed to start listeners                                                           [失败]
根据错误提示,是IPv6相关的协议启不来,那么就去修改dovecot的配置文件/etc/dovecot/devecot.conf

vi打开文件后在文件是搜索listen和[::],其实也不用搜了,就是第六行了

先注释掉listen = * [::]

然后再插入一行listen = *

:wq保存

service dovecot start启动服务,OK

0 回复

发表评论

Want to join the discussion?
Feel free to contribute!

发表评论

您的电子邮箱地址不会被公开。