Dovecot install error: Sub-process /usr/bin/dpkg returned an error code

I am trying to install a mail server on my Raspberry Pi.

I have setup the FQDN and run apt-get update, and am trying to install postfix, mysql and dovecot with the command apt-get install postfix postfix-mysql dovecot-core dovecot-imapd dovecot-pop3d dovecot-lmtpd dovecot-mysql mysql-server

However, I get the error message:

Processing triggers for menu ...
Errors were encountered while processing:
 dovecot-imapd
 dovecot-lmtpd
 dovecot-pop3d
E: Sub-process /usr/bin/dpkg returned an error code (1)

I have tried using -f when running the install command, and have also verified that the hostname is correct.

The full output of the install command can be found here (with HOSTNAME being my actual hostname, and the same for DOMAIN and TLD).

Does anyone know how I can fix this?

The Raspberry Pi is running Raspbian Wheezy 05-05-2014

Answer

It’s look like for me that you have IPv6 disabled on the host.

Restarting IMAP/POP3 mail server: dovecotError: 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
 failed!

I’m not familiar with Debian/Raspbian but those errors occurs when dovecot try to use network protocols (::) that are not supported by system. Are you sure Raspbian is fully IPv6-aware?

Attribution
Source : Link , Question Author : user2370460 , Answer Author : Kondybas

Leave a Comment