Hello to all, I join this thread just to say that I have the same problem. I use dovecot 2.4.4 and I have the following problem.
dovecot.conf: passdb ldap { fields { mail = %{ldap:mail} password = %{ldap:userPassword} userdb_home = %{ldap:homeDirectory} userdb_crypt_private_key_password = %{password} } ........ } userdb prefetch { driver = prefetch }
userdb ldap { driver = ldap fields { crypt_global_public_key_file = inline:%{ldap:pubkey} crypt_global_private_key/main/crypt_private_key_file =inline:%{ldap:privkey} userdb_key = inline:%{ldap:privkey} home = %{ldap:homeDirectory} } ............. } crypt_global_private_key main { } protocol imap { mail_plugins { mail_crypt = yes } crypt_global_private_key main { crypt_private_key_file = inline:LS0tLS1CRUd......................... crypt_private_key_password = %{userdb:crypt_private_key_password} } }
If I use in the protocol imap section the crypt_private_key_file = inline:LS0tLS1CRUd..... all is working. But if I try to get the private key from the userdb I have the paring problem of the key.
The following works: crypt_private_key_file = inline:LS0tLS1CRUd......................... crypt_private_key_file = %{home}/pem.key
(where I copied the pem version of the base64 encoded to a file in the home of the user.
The following doesn't work:
crypt_private_key_file = %{userdb:crypt_private_key_file} crypt_private_key_file = %{userdb:key} crypt_private_key_file = %{userdb:userdb_key}
I tried to remove: crypt_global_private_key main { } but it is the same.
Did you solve it? Thank you.