doveauth: log when a new account is created

This commit is contained in:
link2xt
2024-07-08 19:57:17 +00:00
committed by holger krekel
parent 698d328620
commit 62c60d3070
2 changed files with 4 additions and 0 deletions

View File

@@ -121,6 +121,7 @@ def lookup_passdb(db, config: Config, user, cleartext_password):
q = """INSERT INTO users (addr, password, last_login)
VALUES (?, ?, ?)"""
conn.execute(q, (user, encrypted_password, int(time.time())))
print(f"Created account {user}", file=sys.stderr)
return dict(
home=f"/home/vmail/mail/{config.mail_domain}/{user}",
uid="vmail",