# Dovecot: service launch failing



## heximal (May 19, 2013)

Hello.

I've got strange issue with my *D*ovecot service, it's suddenly stopped working and won't launch. First of all, for some reason one configuration file (dovecot-sql.conf) disappeared. I restored it and tried to launch dovecot:

`/usr/local/etc/rc.d/dovecot start`

which caused the error


```
Last died with error (see error log for more information): Auth process died too early - shutting down
```

I'm looking into /var/log/messages and discovering the details:


```
May 18 21:48:04 vm4304 dovecot: auth(default): Fatal: net_listen_unix (/var/spool/postfix/private/auth) failed: No such file or directory
```

What can be wrong? Would appreciate for any suggestion.


----------



## ShelLuser (May 20, 2013)

Well, solely basing myself on the error you shared it appears that Dovecot is expecting /var/spool/postfix/private/auth to be present while it's not. Why that is so is something I obviously cannot answer, that depends on the way you configured Postfix.


----------



## heximal (May 20, 2013)

Thanks for response, actually it was the first thing I tried to do. I created /var/spool/postfix/private/auth manually and tried to run the service again. This time the log displayed 
	
	



```
Fatal: Socket already exists: /var/spool/postfix/private/auth
```
 which obviously means that the service creates this directory upon launch.


----------



## ShelLuser (May 20, 2013)

heximal said:
			
		

> Thanks for response, actually it was the first thing I tried to do.
> I created /var/spool/postfix/private/auth manually and tried to run service again.


That doesn't tell you anything. Keep in mind that we're not talking about regular files here but _sockets_ (also see the socket(2) manual page).

So obviously weird things will happen if a program expects to open a socket while a regular file is already present.


----------



## xtaz (May 28, 2013)

This socket is usually created by dovecot and used by postfix for SASL authentication based on dovecot auth. I'm guessing it might be a permissions issue. Check the /usr/local/etc/dovecot/conf.d/10-master.conf file which is where this socket is usually configured. I usually alter the permissions so that it matches the parent directory and other things in that directory with this config:


```
unix_listener /var/spool/postfix/private/auth {
    mode = 0666
    user = postfix
    group = postfix
}
```

In the last update of the port the path to this socket was changed in the default config. It used to be /var/run/dovecot/auth-client.

Or course this is assuming you actually have postfix installed. If you don't then comment out those lines in that config file.


----------

