Solved [Solved] dovecot failing - not compiled with LDAP

Hi all

I realize that there has been a lot of writing, and I have read a lot of it, but I have not been able to find the resolution to this.

I am trying to add LDAP to my Dovecot installation, but Dovecot is failing to start with this message:
Code:
Jul  9 16:21:31 caipirinha dovecot: Dovecot v1.2.17 starting up
Jul  9 16:21:31 caipirinha dovecot: auth(default): Fatal: Support not compiled in for passdb driver 'ldap'
Jul  9 16:21:31 caipirinha dovecot: dovecot: Fatal: Auth process died too early - shutting down
(This is the full message from the maillog.)

I do add LDAP to the package by doing:
Code:
cd /usr/ports/mail/dovecot

make deinstall
make config
(add ldap support)
make install
but get the same message.

Some solutions on the web suggest to install the dovecot-ldap port instead of dovecot. I can however not find any such port or package.

What am I missing? I have been on this for a few days. Any help is very welcome (even "Read this f... line in the docs:... " ;)

My configuration:
Code:
FreeBSD 9.1-RELEASE #0 r243826: Tue Dec  4 06:55:39 UTC 2012 i386
dovecot-1.2.17      Secure and compact IMAP and POP3 servers
dovecot-managesieve-0.11.13 Dovecot ManageSieve Server daemon
dovecot-sieve-1.2+0.1.19 A Sieve plugin for the Dovecot 'deliver' LDA
openldap-client-2.4.35 Open source LDAP client implementation
openldap-server-2.4.35 Open source LDAP server implementation
Sendmail Version 8.14.7

Code:
caipirinha# dovecot -n
# 1.2.17: /usr/local/etc/dovecot.conf
# OS: FreeBSD 9.1-RELEASE i386  
protocols: imap managesieve
listen(default): *
listen(imap): *
listen(managesieve): *:4190
ssl: no
disable_plaintext_auth: no
login_dir: /var/run/dovecot/login
login_executable(default): /usr/local/libexec/dovecot/imap-login
login_executable(imap): /usr/local/libexec/dovecot/imap-login
login_executable(managesieve): /usr/local/libexec/dovecot/managesieve-login
verbose_proctitle: yes
first_valid_uid: 1000
first_valid_gid: 1000
mail_privileged_group: mail
mail_location(default): mbox:~/mail/:INBOX=/var/mail/%u
mail_location(imap): mbox:~/mail/:INBOX=/var/mail/%u
mail_location(managesieve): mbox:~/mail
mail_executable(default): /usr/local/libexec/dovecot/imap
mail_executable(imap): /usr/local/libexec/dovecot/imap
mail_executable(managesieve): /usr/local/libexec/dovecot/managesieve
mail_plugin_dir(default): /usr/local/lib/dovecot/imap
mail_plugin_dir(imap): /usr/local/lib/dovecot/imap
mail_plugin_dir(managesieve): /usr/local/lib/dovecot/managesieve
imap_client_workarounds(default): delay-newmail netscape-eoh tb-extra-mailbox-sep
imap_client_workarounds(imap): delay-newmail netscape-eoh tb-extra-mailbox-sep
imap_client_workarounds(managesieve): 
dict_db_config: /usr/local/etc/dovecot-db.conf
lda:
  postmaster_address: [email]mads@dacostaclub.com[/email]
  mail_plugins: sieve
  mail_plugin_dir: /usr/local/lib/dovecot/lda
  sendmail_path: /usr/sbin/sendmail
auth default:
  mechanisms: plain login
  username_format: %Lu
  verbose: yes
  debug: yes
  passdb:
    driver: pam
    args: session=yes dovecot
  passdb:
    driver: ldap
    args: /usr/local/etc/dovecot-ldap.conf
  userdb:
    driver: passwd
    args: blocking=yes
  socket:
    type: listen
    client:
      path: /var/run/dovecot/auth-client
      mode: 432
    master:
      path: /var/run/dovecot/auth-master
      mode: 384
plugin:
  sieve: ~/dovecot.sieve
caipirinha#


/Mads
 
[solved]

Hi all,

This is resolved. I ran the configuration again - this time I ran a make after the config:
Code:
cd /usr/ports/mail/dovecot

make deinstall
make config
(add ldap support)
make
make install

and now dovecod Dovecot starts without the message. It is also doing the lookup of users in both PAM and LDAP, so success.

So - lesson learned: run the extra make after the make config. :r

/Mads
 
The make config only changes options when building the port. It does nothing for an already installed version. After the options are set the port needs to be built and installed.
 
Back
Top