On 20.10.2020 9.30, Matthias Lay wrote:> Am Tue, 20 Oct 2020 09:31:16 +0700 > schrieb Victor Sudakov <vas at sibptus.ru>: > > >> Hello Sami, >> >> I have seen this but I do not want this information in a database. If >> you know how to make the lastlogin_plugin write to a local file, that >> would be very helpful. Even a local sqlite database would do. >> >> The documentation for the plugin seems very scarce. >> >> > you could touch a file in the postlogin scriptYou can use lastlogin plugin to write to a file too. It's not just database. plugin { ?? last_login_dict = file:/somewhere/lastlogin } Aki -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 488 bytes Desc: OpenPGP digital signature URL: <https://dovecot.org/pipermail/dovecot/attachments/20201020/4e023f8b/attachment-0001.sig>
Aki Tuomi wrote:> > On 20.10.2020 9.30, Matthias Lay wrote: > > Am Tue, 20 Oct 2020 09:31:16 +0700 > > schrieb Victor Sudakov <vas at sibptus.ru>: > > > > > >> Hello Sami, > >> > >> I have seen this but I do not want this information in a database. If > >> you know how to make the lastlogin_plugin write to a local file, that > >> would be very helpful. Even a local sqlite database would do. > >> > >> The documentation for the plugin seems very scarce. > >> > >> > > you could touch a file in the postlogin script > > > You can use lastlogin plugin to write to a file too. It's not just database. > > plugin { > > ?? last_login_dict = file:/somewhere/lastlogin > > }Thanks, works this way. The contents of the lastlogin text file looks odd, but there is nothing AWK cannot transform :-) -- Victor Sudakov, VAS4-RIPE, VAS47-RIPN 2:5005/49 at fidonet http://vas.tomsk.ru/ -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 455 bytes Desc: not available URL: <https://dovecot.org/pipermail/dovecot/attachments/20201020/1741a9a8/attachment.sig>
On 20 Oct 2020, at 00:33, Aki Tuomi <aki.tuomi at open-xchange.com> wrote:> plugin { > > last_login_dict = file:/somewhere/lastlogin > > }It may be worth nothing that this can be specified as ~/.lastlogin As well as something along the liens of /usr/local/virtual/%d/%u/.lastlogin Dovecot is smart enough to do the expansion per user in the ~ The contents of the file are simply the epoch times stamp of the last login and the string "shared/last-login/%u" As far as I can tell, though I suppose %u may vary by config? (It makes much more sense to me to put this information into the user database than into a text file, but that's neither here nor there). -- "Are you pondering what I'm pondering?" Pinky: (holding one of the pointy pieces from Sorry! and the bottle of Slick 'n Slide) I think so, Br... Brain: [shuts Pinky's mouth] No, on second thought, don?t tell me... I don't think they allow that in a book with the Comics Code.
@lbutlr wrote:> On 20 Oct 2020, at 00:33, Aki Tuomi <aki.tuomi at open-xchange.com> wrote: > > plugin { > > > > last_login_dict = file:/somewhere/lastlogin > > > > } > > It may be worth nothing that this can be specified as ~/.lastlogin > As well as something along the liens of /usr/local/virtual/%d/%u/.lastlogin > > Dovecot is smart enough to do the expansion per user in the ~Thanks for the hint. -- Victor Sudakov, VAS4-RIPE, VAS47-RIPN 2:5005/49 at fidonet http://vas.tomsk.ru/ -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 455 bytes Desc: not available URL: <https://dovecot.org/pipermail/dovecot/attachments/20201021/6d6d1df8/attachment.sig>