Hi
You may find some Plugins if you use a front-end like round cube. 
I recall seeing a field in the postfix MySQL database. 
I'm not sure on Maildirs since mails would be delivered and timestamps changed even if user is not logging in. 

Cheers/DP

On Fri, May 17, 2019, 18:21 Lefteris Tsintjelis via dovecot <dovecot@dovecot.org> wrote:
I am using dovecot virtual maildir accounts. Is it possible to find last
day of login for an account by checking the last modification time of
the maildir files?

Lefteris