Error: userdb lookup: connect(/var/run/dovecot/auth-userdb) failed: Connection refused

Installation

  1. Ubuntu 14.04 fresh installation
  2. Minifi the installation
  3. apt-get update
  4. apt-get install curl
  5. apt-get install sudo
  6. curl -s https://mailinabox.email/bootstrap.sh | sudo bash

First error message after the initial questions about the email address and the hostname

  • FAILED: service postgrey restart
  • Solution : Manually restart postgrey and run bootstrap.sh again

Second error

Error: userdb lookup: connect(/var/run/dovecot/auth-userdb) failed: Connection refused
doveadm(me@mydomain.xyz): Fatal: User lookup failed: Internal error occurred. Refer to server log for more information.

Solution: This is actually a problem when your box doesn’t have Ipv6 enabled but your Kernel and your settings do… and here’s the problem, on ubuntu I wasn’t able to actually disable Ipv6 …maybe you are more luck than I was, besides ubuntu is not my most favorite distro.

So edit /etc/dovecot/dovecot.conf and find the line
#listen = *, ::
and change it to
listen = *

You can test dovecot now with service dovecot restart, you will see that dovecot wasn’t running but now it started…

So let’s do the process again… running curl and bootstrap.sh

This time your installation finishes all the way and you can actually add the new email, which in our case is the admin emai…
But …yes there’s a but, nginx refuses to start… so here’s what you need to do in order to have nginx start… you need to disable nginx Ipv6 functionality.

Here’s how you can achieve this ….

First locate /etc/nginx/conf.d/local.conf and comment the following lines
listen [::]:80;
You need to do this in server section and https section…
Second find the /etc/sites-available/default file and edit the Ipv6 lines again

Now you can start nginx!

2 Likes