On 3/4/21 3:21 AM, @lbutlr wrote:
On 03 Mar 2021, at 05:38, Aki Tuomi aki.tuomi@open-xchange.com wrote:
These days you can also replace last-login with mail-lua script, which can do lot more than just try to set a dict. But last-login rather useful information when you are debugging, or removing dormant accounts. And other customer support incidents. Sure, being able to check a last login, approximately, is obviously useful. Bu clogging it for every login
I do use last-login and I do agree that incrementing the timestamp when the existing value isn't too old is not very useful.
I have several deployments where everything is stored in and consumed from MySQL, so deploying redis just for this seems too much. The database is replicated. We end up seeing most of the replication traffic (network and disk IO) coming from last-login. Using specifically binlog_format = ROW, I can mitigate this with a trigger saying 'IF NEW.lastlogin < (OLD.lastlogin + 900) THEN SET NEW.lastlogin = OLD.lastlogin' and I end up having an unchanged row, so nothing goes to the binlog. Especially with pop3 users (some people do still do that) this can be a huge reduction in traffic.
It would perhaps be a nice feature if the last-login plugin could first fetch from the dict and do this comparison on its own.