mirror of
https://github.com/chatmail/relay.git
synced 2026-05-10 16:04:37 +00:00
create mailboxes parent directories if needed
This commit is contained in:
@@ -30,3 +30,13 @@ def test_get_user_dict(make_config, tmp_path):
|
||||
assert data["uid"] == "vmail"
|
||||
assert data["gid"] == "vmail"
|
||||
assert data["password"] == enc_password
|
||||
|
||||
|
||||
def test_no_mailboxes_dir(testaddr, example_config, tmp_path):
|
||||
p = tmp_path.joinpath("a", "mailboxes")
|
||||
example_config.mailboxes_dir = p
|
||||
|
||||
user = example_config.get_user(testaddr)
|
||||
user.set_password("someeqkjwelkqwjleqwe")
|
||||
user.set_last_login_timestamp(100000)
|
||||
assert user.get_last_login_timestamp() == 86400
|
||||
|
||||
@@ -41,7 +41,7 @@ class User:
|
||||
The caller has to ensure only a single thread writes to the same
|
||||
user's password file.
|
||||
"""
|
||||
self.maildir.mkdir(exist_ok=True)
|
||||
self.maildir.mkdir(exist_ok=True, parents=True)
|
||||
password = enc_password.encode("ascii")
|
||||
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user