last_logon SQL mapping

Aki Tuomi aki.tuomi at dovecot.fi
Tue Jul 25 20:10:16 EEST 2017


> On July 22, 2017 at 4:42 PM viper <viper at vip32.net> wrote:
> 
> 
> Hi
> 
> I have been attempting to do a mapping on the last_logon plugin. I have 
> been reading the documentation on mapping. is there any way to customise 
> a little more and create a individual SQL query for each of the 
> functions SELECT and UPDATE, my current SQL setup has the username and 
> domain in separate tables and my user_query and password_query are 
> concat which I do not believe can be defined in the dictionary map 
> process, I was also wanting to use datatime as the saved field but it 
> seems only the unix timestamp is used. If there is any way to create a 
> fully custom query that can be executed I believe this would allow me to 
> preform the action am looking for in the same manner as the user_query 
> and password_query
> 
> If anyone has any suggestions please let me know
> 
> Regards
> 
> Craig

Hi!

The last_login plugin uses dict interface to update the last login values, so custom SQL is not feasible to do. In your case it's probably best to use postlogin script instead, although it will make last login information less accurate.

Aki


More information about the dovecot mailing list