Skip to content

Commit f855e76

Browse files
committed
mail-crypt: Recommend using stronger hash for user key encryption password
1 parent 0dfa1c3 commit f855e76

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

docs/core/plugins/mail_crypt.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,8 @@ provided via the [[setting,crypt_user_key_password]] setting. See below.
334334
It is recommended to use a hash of the user's plaintext login password as the
335335
encryption key password instead of the plaintext password directly. This way
336336
the plaintext password is less likely to become visible accidentally, such as
337-
in debug logs.
337+
in debug logs. Also using a strong hash makes the key more resistant against
338+
brute force attacks.
338339

339340
Another issue that you must consider when using the login password is that
340341
when the password changes, **you must re-encrypt the user private key**.
@@ -344,7 +345,7 @@ password:
344345

345346
```[dovecot.conf]
346347
passdb sql {
347-
query = SELECT email as user, password, '%{password | sha256}' AS userdb_crypt_user_key_password \
348+
query = SELECT email as user, password, '%{password | hash("pbkdf2")}' AS userdb_crypt_user_key_password \
348349
FROM virtual_users \
349350
WHERE email='%{user}'
350351
}

0 commit comments

Comments
 (0)