Storing Last Login Plugin value in SQL

Gedalya gedalya at gedalya.net
Mon Sep 13 21:20:39 EEST 2021


On 9/14/21 02:12, dovecot at ptld.com wrote:
>
> Anyone have any idea how to get the last-login plugin to update a date/time column in sql?

I use this to throttle updates to once in 900 seconds:

create trigger tg1 before update on mailacct for each row if new.lastlogin < (old.lastlogin + 900) then set new.lastlogin = old.lastlogin; end if;

You can try:

create trigger tg1 before update on mailacct for each row set new.logindate = FROM_UNIXTIME(new.lastlogin);



More information about the dovecot mailing list