# Dovecot is not starting



## nishan (May 17, 2014)

I am running Dovecot 2.2.12 on FreeBSD 10.0-RELEASE-P3. My rc.conf contains 
	
	



```
dovecot_enable="YES"
```
. but, Dovecot does not start on the system boot. Even if I use `service dovecot start` Dovecot does not respond at all. Even no error message of any type. No logs are generated either.

If I type in `dovecot` then Dovecot starts properly and `telnet localhost 143` responds as usual. But my problem is that I want to start it on the very boot time just like other services Exim, and Apache 24 starts without any human interface. Can you figure out what went wrong, and suggest me any solution etc. However by the way am successfully running Dovecote 2.2.10 on the same platform but on another machine.

Need you any more information please do let me know.

Thanking you.


----------



## iulius (Jun 18, 2014)

Hi,

I am expierencing exactly the same issue. I am using the current port 2.2.13 and it starts without a problem using `dovecot`. However neither `service dovecot onestart`  nor `service dovecot start` seem to do anything and no logs are written. Calling `ps -A` only shows the dovecot processes when started manually from shell.
Have you or anyone else been able to figure the issue out?

Regards,

Iulius


----------



## hockey97 (Jun 19, 2014)

I got a similar problem but I am suing version 2.2.10. and I am getting a weird error in the logs. It saying that socket listen isn't a setting. yet when I looked at the example configuration files, it shows that it is a setting. So, I cannot start Dovecot at all unless I clear that error but no matter what I do it won't go away, even when I comment that portion out; whatever is after that part gets flagged as the error.


----------



## xtaz (Jun 20, 2014)

It works fine for me so I don't think it's any particular issue with the O/S or the Port. I would say it's something wrong with your particular installation. Though I can't think what it could be! Do you definitely have the rc script in /usr/local/etc/rc.d/dovecot? Or I'd say there could be a dodgy character in /etc/rc.conf causing it to not be parsed properly.


```
# uname -r
10.0-STABLE

# pkg info | grep dovecot
dovecot2-2.2.13                Secure and compact IMAP and POP3 servers

# md5 /usr/local/etc/rc.d/dovecot
MD5 (/usr/local/etc/rc.d/dovecot) = 65c4bd1c93cb29f3cc51e394c7905dfc

# grep dovecot /etc/rc.conf
dovecot_enable="YES"

# service dovecot stop
Stopping dovecot.
Waiting for PIDS: 71165.

# service dovecot start
Starting dovecot.

# ps waux | grep dovecot
root      42596   0.2  0.1  15296   2572  -  Ss    1:21pm     0:00.01 /usr/local/sbin/dovecot -c /usr/local/etc/dovecot/dovecot.con
```


----------



## obsigna (Jun 20, 2014)

hockey97 said:
			
		

> I got a similar problem but I am suing version 2.2.10. and I am getting a weird error in the logs. It saying that socket listen isn't a setting.



Your problem is not similar to the others.



			
				hockey97 said:
			
		

> Yet when I looked at the example configuration files, it shows that it is a setting.



socket listen and socket connect are settings for the obsolete Dovecot v1.x, and these are no settings for Dovecot 2.2.10. So the error in the logs is not weird but simply correct.



			
				hockey97 said:
			
		

> So, I cannot start Dovecot at all unless I clear that error but no matter what I do it won't go away, even when I comment that portion out; whatever is after that part gets flagged as the error.



I suggest to deep-clean your whole Dovecot installation, and to start over from the scratch again, and this time, if you really need to work along a tutorial, you want to utilize a tutorial for Dovecot v2.x and not for the obsolete Dovecot v1.x.


----------



## obsigna (Jun 20, 2014)

iulius said:
			
		

> I am expierencing exactly the same issue. I am using the current port 2.2.13 and it starts without a problem using `dovecot`. However neither `service dovecot onestart`  nor `service dovecot start` seem to do anything and no logs are written. Calling `ps -A` only shows the dovecot processes when started manually from shell.
> Have you or anyone else been able to figure the issue out?
> Iulius



Lookout for dovecot at the output of the command `service -e`:

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

If the rc-script of Dovecot does not appear in the list of services, then there is something wrong with your /etc/rc.conf. As @xtaz suggested, perhaps a stray control character may be the problem.

If it appears in the list of services, you might want to find out, why there is no logging. So, look at the output of the command `doveadm log find`. By default Dovecot logs to syslog using the mail facility..

If the above still doesn't reveal any clue about the logging, then check your settings. The following command shows all active Dovecot settings related to logging `doveconf | grep log[^login]`. Pay attention to the various *log_path settings. And to the log_facility.

Eventually, you would look at the respective log-files for any sensible error message.


----------



## hockey97 (Jul 24, 2014)

obsigna said:
			
		

> hockey97 said:
> 
> 
> 
> ...



How do you know it's obsolete?  I  talked to many on here and others online. Most don't tell me that it's obsolete. 

https://workaround.org/ispmail/squeeze/ ... up-dovecot
https://forums.gentoo.org/viewtopic-t-8 ... art-0.html

I looked at the examples in the ports and found noting indicating that it was outdated.


----------



## obsigna (Jul 24, 2014)

hockey97 said:
			
		

> How do you know it's obsolete?  I  talked to many on here and others online. Most don't tell me that it's obsolete.
> 
> https://workaround.org/ispmail/squeeze/ ... up-dovecot
> ...



https://workaround.org/comment/1633#comment-1633


----------



## ShelLuser (Jul 24, 2014)

hockey97 said:
			
		

> How do you know it's obsolete?  I  talked to many on here and others online. Most don't tell me that it's obsolete.


When talking about Dovecot 1.x then this will become immediately clear when looking at the official Dovecot download page. Version 1.x is filed as "Old stable release".

And if you really need confirmation then simply look at the Official documentation for Dovecot 1.x (the 'wiki1'). Seems pretty clear that the official authors themselves consider it pretty much obsolete.

*Edit*:

I see where the confusion is coming from. Yeah, FreeBSD still provides mail/dovecot which at the time of writing provides 1.2.17_3, which of course isn't obsolete but still being maintained and still safe to use. I'm using it on my production environments too.

Even so; version 2.x is a commonly used version and the one which the author is actively working on (which, for me, is reason enough to stick with 1.x).


----------



## hockey97 (Aug 3, 2014)

ShelLuser said:
			
		

> hockey97 said:
> 
> 
> 
> ...




I am using the Dovecot version 2.2.10.  So, config 2.2. The problem is that socket listen in the config is where I get the errors in the config.

However, the error just says  no such setting socket.

Here's the actual error it's spitting out:


```
doveconf: Fatal: Error in configuration file /path/local/etc/dovecot/dovecot.conf line 1121: Unknown setting: socket
doveconf: Error: managesieve-login: dump-capability process returned 89
doveconf: Fatal: Error in configuration file /path/local/etc/dovecot/dovecot.conf line 1121: Unknown setting: socket
```

I don't get why it's doing this. Others here says it's because socket is obsolete. Yet, I looked at the 2.0 and 2.2 upgrade guides and nothing shows that they replaced it.  I seen a lot of  Dovecot version 2.0 config files that uses this.
So, I don't understand how it would just be obsolete to be the issue at hand right now.


----------



## ljboiler (Aug 3, 2014)

> I don't get why it's doing this. Others here says it's because socket is obsolete. Yet, I looked at the 2.0 and 2.2 upgrade guides and nothing shows that they replaced it.


I too noticed that the Dovecot migration guide (http://wiki2.dovecot.org/Upgrading/2.0) doesn't mention anything replacing the "socket" syntax with something new, so I guess that fact was supposed to be covered by just having 1.x users run the config conversion command and everything would be taken care of.  However, when I compared the Dovecot Wiki How-To sections on setting up authentication, there is most definitely a difference between the settings for Dovecot 1.x (http://wiki1.dovecot.org/HowTo/PostfixAndDovecotSASL), which uses the "socket" syntax, and Dovecot 2.x (http://wiki2.dovecot.org/HowTo/VirtualUserFlatFilesPostfix), which uses a "service auth" syntax.


> I talked to many on here and others online. Most don't tell me that it's obsolete.
> 
> https://workaround.org/ispmail/squeeze/ ... up-dovecot
> https://forums.gentoo.org/viewtopic-t-8 ... art-0.html


Go back and re-read those posts (you may need to skip to the  Comments section to get to the part where Dovecot 2.x is actually being discussed); you should find what you need there.


----------



## hockey97 (Aug 3, 2014)

ljboiler said:
			
		

> > I don't get why it's doing this. Others here says it's because socket is obsolete. Yet, I looked at the 2.0 and 2.2 upgrade guides and nothing shows that they replaced it.
> 
> 
> I too noticed that the Dovecot migration guide (http://wiki2.dovecot.org/Upgrading/2.0) doesn't mention anything replacing the "socket" syntax with something new, so I guess that fact was supposed to be covered by just having 1.x users run the config conversion command and everything would be taken care of.  However, when I compared the Dovecot Wiki How-To sections on setting up authentication, there is most definitely a difference between the settings for Dovecot 1.x (http://wiki1.dovecot.org/HowTo/PostfixAndDovecotSASL), which uses the "socket" syntax, and Dovecot 2.x (http://wiki2.dovecot.org/HowTo/VirtualUserFlatFilesPostfix), which uses a "service auth" syntax.
> ...




Thanks I will look at those websites. 

I do have the service auth syntax:


```
service auth {
unix_listener /path/spool/postfix/private/auth {
        group = postfix
        mode = 0660
        user = postfix
    }
}
```

I have that setup. This is located  before the part of socket listen { }.
So, it's not generating an error at the service auth part.

When I updated my OS and the software's... all them asked to replace outdated syntax. I put yes.
I did this for PHP going from PHP5 to 5.5  and MYSQL  and Apache to the latest version. I never had any problems.
Even Postfix upgraded ok. It just that dovecot would spit out this error after doing it. 

I will check out those links and see if someone there can help me.

You would see here: https://workaround.org/ispmail/squeeze/ ... up-dovecot

It shows to use socket listen andi t's for Dovecot 2.x etc.


----------



## ljboiler (Aug 4, 2014)

> You would see here: https://workaround.org/ispmail/squeeze/ ... up-dovecot
> 
> It shows to use socket listen andi t's for Dovecot 2.x etc.


I don't see anywhere in that tutorial where it states what specific Dovecot version being used.  What I DO see, however, near the end of the tutorial is this:


> Restart Dovecot:
> 
> /etc/init.d/dovecot restart
> 
> ...


That sure looks like Dovecot 1.x and not 2.x to me.

Check the *working dovecot.conf for Dovecot 2.0 from w3sz* comment to that tutorial.


----------

