From 06f3bbf6cd41250e3a10a26ddc2479dba6109098 Mon Sep 17 00:00:00 2001 From: Christian Hagenest Date: Thu, 20 Jun 2024 16:42:05 +0200 Subject: [PATCH] round login-time in doveauth --- chatmaild/src/chatmaild/doveauth.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chatmaild/src/chatmaild/doveauth.py b/chatmaild/src/chatmaild/doveauth.py index 74e1f784..e6ec0fbf 100644 --- a/chatmaild/src/chatmaild/doveauth.py +++ b/chatmaild/src/chatmaild/doveauth.py @@ -106,7 +106,7 @@ def lookup_passdb(db, config: Config, user, cleartext_password): if userdata: # Update last login time. conn.execute( - "UPDATE users SET last_login=? WHERE addr=?", (int(time.time()), user) + "UPDATE users SET last_login=? WHERE addr=?", (round(int(time.time()) // 86400), user) # only save the rounded down date of login ) userdata["home"] = f"/home/vmail/mail/{config.mail_domain}/{user}"