How to Fix Dovecot ‘Address Family Not Supported by Protocol’ Error

Content:

After installing Dovecot, you might find the service is unable to start, with the following error message:

master: Error: service(imap-login): listen(::, 993) failed: Address family not supported by protocol

This error occurs as Dovecot is trying to bind to an IPv6 interface, which is not available. It can be fixed by removing IPv6 support from the Dovecot configuration.

To do this, open the main Dovecot configuration. This is usually /etc/dovecot/dovecot.conf.

nano /etc/dovecot/dovecot.conf

Find the line that begins with listen. This may be commented out.

#listen = *, ::

In this statement, * corresponds to IPv4, while :: corresponds to IPv6. Remove ::, and ensure the line is uncommented.

listen = *

Save the file, and try to start Dovecot. Dovecot should now start successfully.