<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Thanks for your idea, indeed, this is the trick.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">I added `override_fields = userdb_mail_crypt_private_password=%w userdb_mail_crypt_save_version=2` to the passdb config and it works<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Mar 20, 2021 at 10:43 PM Aki Tuomi <<a href="mailto:aki.tuomi@open-xchange.com">aki.tuomi@open-xchange.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
> On 20/03/2021 22:43 Davy Landman <<a href="mailto:davy.landman@gmail.com" target="_blank">davy.landman@gmail.com</a>> wrote:<br>
> <br>
> <br>
> I've been reading quite a bit of discussions, the manual and a few often linked posts about mail-crypt-plugin, but most of them seem to assume a sql db backing. But if you are using a passwd file userdb, is it possible to make the per-user-key mode of the mail-crypt-plugin work?<br>
> <br>
> I like the trick of passing in the key via an extra calculated/virtual column in the query (even allows for hashing the password for example). But I cannot see how this can work with the passwd backing?<br>
> <br>
> Any pointers would be appreciated.<br>
> <br>
> Kind regards,<br>
> Davy<br>
> <br>
> <br>
> <br>
<br>
passdb {<br>
  driver = passwd-file<br>
  args = ...<br>
  override_fields = userdb_mail_crypt_private_password=%{sha256:password} <br>
}<br>
<br>
might work<br>
<br>
Aki<br>
</blockquote></div>