Solved Dovecot 2.3.11.3 - dovecot not starting

Long time no post; working out some dovecot issues still. Now that I am back dealing with dovecot. I am using the following version:

2.3.11.3

I have configured /usr/local/etc/dovecot/dovecot.conf with the baseline configuration. Also have the dovecot-sql.conf in the /usr/local/etc/dovecot/conf.d/ directory.

I have verified the symlink exists between /var/run/dovecot/dovecot.conf and /usr/local/etc/dovecot/dovecot.conf using the :

Code:
/var/run/dovecot # ln -s /var/run/dovecot/dovecot.conf /usr/local/etc/dovecot/dovecot.conf
ln: /usr/local/etc/dovecot/dovecot.conf: File exists

And all checks out.

It's running in a static ip / jail.

This is the error message upon starting the daemon:

Code:
/usr/local/etc/dovecot/conf.d # service dovecot start
doveconf: Error: t_readlink(/var/run/dovecot/dovecot.conf) failed: readlink() failed: No such file or directory
Starting dovecot.
/usr/local/etc/rc.d/dovecot: WARNING: failed to start dovecot

I have looked online and searched through various bug fix posts. It seemed as if it was resolved in updates and the symlink was an issue throughout the various correspondences.

System: FreeBSD 12.1-RELEASE

If anyone knows what is happening; please let me know. Thank you!
 
I have verified the symlink exists between /var/run/dovecot/dovecot.conf and /usr/local/etc/dovecot/dovecot.conf using the :

Code:
/var/run/dovecot # ln -s /var/run/dovecot/dovecot.conf /usr/local/etc/dovecot/dovecot.conf
ln: /usr/local/etc/dovecot/dovecot.conf: File exists

I don't think that makes full sense. In my installation, the real file (that I have edited) is in /usr/local/etc/dovecot/dovecot.conf. So the symlink would be created (from the real file to the additional location) the other way round, as:
ln -s /usr/local/etc/dovecot/dovecot.conf /var/run/dovecot/dovecot.conf

(Strangely, I have not consciousely noticed about that symlink, and don't remember installing it - but it is present.)

BTW: for that version you might eventually need a patch (if using GSSAPI auth), put this into /usr/ports/mail/dovecot/files/patch-xa-knownbug-in-2.3.11.3

Code:
--- src/auth/mech-gssapi.c.orig 2020-10-22 20:58:13.825735000 +0000
+++ src/auth/mech-gssapi.c      2020-10-22 20:58:51.512370000 +0000
@@ -735,7 +735,7 @@
const struct mech_module mech_gssapi = {
        "GSSAPI",

-       .flags = 0,
+       .flags = MECH_SEC_ALLOW_NULS,
        .passdb_need = MECH_PASSDB_NEED_NOTHING,

        mech_gssapi_auth_new,
 
I don't think that makes full sense. In my installation, the real file (that I have edited) is in /usr/local/etc/dovecot/dovecot.conf. So the symlink would be created (from the real file to the additional location) the other way round, as:
ln -s /usr/local/etc/dovecot/dovecot.conf /var/run/dovecot/dovecot.conf

(Strangely, I have not consciousely noticed about that symlink, and don't remember installing it - but it is present.)

BTW: for that version you might eventually need a patch (if using GSSAPI auth), put this into /usr/ports/mail/dovecot/files/patch-xa-knownbug-in-2.3.11.3

Code:
--- src/auth/mech-gssapi.c.orig 2020-10-22 20:58:13.825735000 +0000
+++ src/auth/mech-gssapi.c      2020-10-22 20:58:51.512370000 +0000
@@ -735,7 +735,7 @@
const struct mech_module mech_gssapi = {
        "GSSAPI",

-       .flags = 0,
+       .flags = MECH_SEC_ALLOW_NULS,
        .passdb_need = MECH_PASSDB_NEED_NOTHING,

        mech_gssapi_auth_new,
PMc,

Thank you for the patch information and the reverse symlink. My brain gets things backwards often. I have completed the ln -s entry command with the following results:

Code:
root@#:/usr/ports/mail/postfix # ln -s /usr/local/etc/dovecot/dovecot.conf /var/run/dovecot/dovecot.conf
root@#:/usr/ports/mail/postfix # service dovecot start
Starting dovecot.
/usr/local/etc/rc.d/dovecot: WARNING: failed to start dovecot
root@#:/usr/ports/mail/postfix # service dovecot status
dovecot is not running.
root@#:/usr/ports/mail/postfix #

If I eventually need that patch; I will give that code a go. I installed via pkg install dovecot, rather than make install clean. I am not sure I am able to apply that patch / hotfix to my knowledge using the package manager over a compile.

Thank you again!
 
PMc,

Thank you for the patch information and the reverse symlink. My brain gets things backwards often. I have completed the ln -s entry command with the following results:

Code:
root@#:/usr/ports/mail/postfix # ln -s /usr/local/etc/dovecot/dovecot.conf /var/run/dovecot/dovecot.conf
root@#:/usr/ports/mail/postfix # service dovecot start
Starting dovecot.
/usr/local/etc/rc.d/dovecot: WARNING: failed to start dovecot

Not so good. That can mean anything.

On a default installation with working syslogd, You should see messages in /var/log/maillog. When it works, they look like this:
Code:
<mail.info> dovecot[7034] master: Dovecot v2.3.11.3 (502c39af9) starting up for imap, pop3, lmtp

It may also help to put some of these into the config during testing.
Code:
  mail_debug = yes
  auth_verbose = yes
  auth_debug = yes
That should give some more output to /var/log/debug.log.

If I eventually need that patch; I will give that code a go. I installed via pkg install dovecot, rather than make install clean.
If you don't use GSSAPI aka kerberos for authentication, you don't need it. And if you don't know what that is, then You probably don't use it.
 
Back
Top