You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In order to enable automatic account deletion for chatmail accounts, Mox needs to track when a user last logged in. In addition, it would be beneficial to regular email users to see the last few recent log-ins. This would make it easier to see if an unauthorized device or actor is accessing someone's account.
However, these two levels of information should be stored differently, and the extra data collection should have an off switch—chatmail servers should store as little information as possible, and tracking all of that extra data runs counter to that principle.
Add column to user database which stores last login timestamp (integer) divided by 86,400 (number of seconds in a day), which is the smallest amount of data which is able to be used for implementing automatic account deletion.
Modify the log-in code to update the last login timestamp whenever someone logs in via SMTP, IMAP, or the web interface
Add another table to the database which stores recent log in attempts. This should include information such as:
FYI, I implemented storing login attempts a few weeks ago, see 1277d78.
For chatmail-mode, I think we would have to hook in at store/loginattempt.go somewhere around LoginAttemptAdd(), to not log/store all the details, but only change the lastlogin timestamp (and only on successful authentication).
I think it makes sense to store the lastlogin timestamp in a separate type, not mixing it in type LoginAttempt in store/loginattempt.go.
I suppose we should start with a "Chatmail" config option so the code can check for that? My idea was gathering all chatmail changes in https://github.com/s0ph0s-dog/mox until we have a working whole, then merge it when chatmail functionality is usable.
This is (kind of) part of a series of issues tracking chatmail support in Mox.
In order to enable automatic account deletion for chatmail accounts, Mox needs to track when a user last logged in. In addition, it would be beneficial to regular email users to see the last few recent log-ins. This would make it easier to see if an unauthorized device or actor is accessing someone's account.
However, these two levels of information should be stored differently, and the extra data collection should have an off switch—chatmail servers should store as little information as possible, and tracking all of that extra data runs counter to that principle.
The text was updated successfully, but these errors were encountered: