On 9/4/23 13:42, TWHG Technical via dovecot wrote:
I believe it really would be good practice to fallback to IPV4 only listeners
if IPV6 listener fails. Rather than crash out.
On my previous reply, I had not yet read the other messages. They were
part of another thread in Thunderbird that I did not see at first.
After reading that and doing a little investigation, I can see that the
comment in my main dovecot config is correct ... * means all Ipv4
interfaces. The default config uses '*, ::' for the listen option.
Dovecot does at least clearly log the problem when IPv6 is configured
and no IPv6 is available:
Sep 4 14:26:41 bilbo dovecot: master: Error: socket() failed: Address
family not supported by protocol
Sep 4 14:26:41 bilbo dovecot: master: Error:
service(managesieve-login): listen(::, 4190) failed: Address family not
supported by protocol
Sep 4 14:26:41 bilbo dovecot: master: Error: socket() failed: Address
family not supported by protocol
Sep 4 14:26:41 bilbo dovecot: master: Error: service(pop3-login):
listen(::, 110) failed: Address family not supported by protocol
Sep 4 14:26:41 bilbo dovecot: master: Error: socket() failed: Address
family not supported by protocol
Sep 4 14:26:41 bilbo dovecot: master: Error: service(pop3-login):
listen(::, 995) failed: Address family not supported by protocol
Sep 4 14:26:41 bilbo dovecot: master: Error: socket() failed: Address
family not supported by protocol
Sep 4 14:26:41 bilbo dovecot: master: Error: service(imap-login):
listen(::, 143) failed: Address family not supported by protocol
Sep 4 14:26:41 bilbo dovecot: master: Error: socket() failed: Address
family not supported by protocol
Sep 4 14:26:41 bilbo dovecot: master: Error: service(imap-login):
listen(::, 993) failed: Address family not supported by protocol
Sep 4 14:26:41 bilbo dovecot: master: Fatal: Failed to start listeners
The default config does explicitly ask for ipv6, so Dovecot did try (and
fail) to start with the requested config, and most importantly, it did
report the problem.
I am not sure that it should have failed to start, though. I think that
ipv4/ipv6 might need to be a special case, where a program logs an
error, but continues to start up and run with support for the other
address family.
I disable ipv6 on all my servers by adding "ipv6.disable=1" to the
kernel commandline in /etc/default/grub. I do it for two reasons. 1)
Some software can behave strangely when ipv6 is enabled. 2) I am not
using ipv6 and do not want my programs doing something unexpected
because an IPv6 interface was contacted. #1 is probably very rare in
recent years, but it was common in the past. I know that a lot of
other admins routinely disable ipv6 on their machines for similar reasons.
An interesting read:
https://cr.yp.to/djbdns/ipv6mess.html
Thanks,
Shawn
_______________________________________________
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org