Re: Regression/Bug report: crypt_private_key_file (for crypt_global_private_key) no longer supports inline base64 (from userdb) in dev branch

"luis.neapolis--- via dovecot" <[email protected]> Fri, 15 May 2026 13:57:45 -0000
Newsgroups gmane.mail.imap.dovecot
Message-ID <[email protected]>
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 protocolo 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 = inline:%{userdb:crypt_private_key_file}
crypt_private_key_file = inline:%{userdb:key}
crypt_private_key_file = inline:%{userdb:userdb_key}

I tried to remove:
crypt_global_private_key main {
}
but it is the same.

Did you solve it?
Thank you.
_______________________________________________
dovecot mailing list -- [email protected]
To unsubscribe send an email to [email protected]