Set mail crypt private password with OAUTH?

Aki Tuomi aki.tuomi at open-xchange.com
Mon Jan 31 06:34:00 UTC 2022


> On 28/01/2022 21:27 Max Kostikov <max at kostikov.co> wrote:
> 
>  
> We currently use Dovecot and mailbox encryption via the 
> mail-crypt-plugin.
> With standard password authentication, we set the value of the 
> individual
> password to encrypt the contents of the 
> userdb_mail_crypt_private_password
> mailbox in the SQL query.
> Is it possible to set the userdb_mail_crypt_private_password value when
> authenticating via OAUTH2 ?
> 
> -- 
> Best regards,
> Max Kostikov

You probably want to split your passdb drivers into two, one which does the authentication and second which populates the private password value. This way it should work correctly on both cases.

passdb {
 driver = sql
 skip = unauthenticated
 ...
}

and ensure your return in this sql query `'Y' as noauthenticate'`

Aki


More information about the dovecot mailing list