mirror of
https://github.com/chatmail/relay.git
synced 2026-05-21 13:28:05 +00:00
ruff again :)
This commit is contained in:
@@ -106,7 +106,8 @@ def lookup_passdb(db, config: Config, user, cleartext_password):
|
||||
if userdata:
|
||||
# Update last login time.
|
||||
conn.execute(
|
||||
"UPDATE users SET last_login=? WHERE addr=?", (round(int(time.time()) // 86400), user)
|
||||
"UPDATE users SET last_login=? WHERE addr=?",
|
||||
(round(int(time.time()) // 86400), user),
|
||||
)
|
||||
|
||||
userdata["home"] = f"/home/vmail/mail/{config.mail_domain}/{user}"
|
||||
|
||||
@@ -25,6 +25,7 @@ def remove_users(db: Database, cutoff_date: int):
|
||||
finally:
|
||||
db.close()
|
||||
|
||||
|
||||
def remove_user_data(db: Database, cutoff_date: int, dir: Path):
|
||||
"""Collects all users where last_login < cutoff_date and deletes corresponding directories."""
|
||||
db.connect()
|
||||
|
||||
Reference in New Issue
Block a user