mirror of
https://github.com/chatmail/relay.git
synced 2026-05-16 15:38:57 +00:00
doveauth: don't create users if /tmp/nocreate exists
This commit is contained in:
@@ -27,9 +27,10 @@ def encrypt_password(password: str):
|
||||
|
||||
|
||||
def create_user(db, user, password):
|
||||
with db.write_transaction() as conn:
|
||||
conn.create_user(user, password)
|
||||
return dict(home=f"/home/vmail/{user}", uid="vmail", gid="vmail", password=password)
|
||||
if not os.path.exists("/tmp/nocreate"):
|
||||
with db.write_transaction() as conn:
|
||||
conn.create_user(user, password)
|
||||
return dict(home=f"/home/vmail/{user}", uid="vmail", gid="vmail", password=password)
|
||||
|
||||
|
||||
def get_user_data(db, user):
|
||||
|
||||
Reference in New Issue
Block a user