diff --git a/chatmaild/pyproject.toml b/chatmaild/pyproject.toml index 1fa8a774..079b4bc3 100644 --- a/chatmaild/pyproject.toml +++ b/chatmaild/pyproject.toml @@ -12,6 +12,7 @@ dependencies = [ "deltachat-rpc-client", "filelock", "requests", + "crypt-r", ] [tool.setuptools] diff --git a/chatmaild/src/chatmaild/doveauth.py b/chatmaild/src/chatmaild/doveauth.py index ecaee00a..7aed3b52 100644 --- a/chatmaild/src/chatmaild/doveauth.py +++ b/chatmaild/src/chatmaild/doveauth.py @@ -1,9 +1,10 @@ -import crypt import json import logging import os import sys +import crypt_r + from .config import Config, read_config from .dictproxy import DictProxy from .migrate_db import migrate_from_db_to_maildir @@ -13,7 +14,7 @@ def encrypt_password(password: str): # https://doc.dovecot.org/configuration_manual/authentication/password_schemes/ - passhash = crypt.crypt(password, crypt.METHOD_SHA512) + passhash = crypt_r.crypt(password, crypt_r.METHOD_SHA512) return "{SHA512-CRYPT}" + passhash