|If you want to find out who isn't logging in, and see the account who have not been used in a long time, you can create a script:|
/root/last_login.shand add the code
If you only want the oldest 10 accounts, for example use "head":
./last_login.sh | head -n 10
For each line, the date will be on the far left, followed by the = character, followed by a url list, eg:
The last login is determined only by checking the last change time of the dovecot.index.log file using "stat".
Note that an idle imap account won't keep updating this file, so it only refers to the actual time something was added to the log, like the original login or alteration of the account (I'm not 100% sure what it logs, so that's just a rough guess).
Point being, it's often several hours older than a potentially active but idle imap connection.
So only use it to track down accounts that are day weeks or months old.
Don't use it to determine a login to the hour or second.
© 2018 JBMC Software, Suite 173 3-11 Bellerose Drive, St Albert, AB T8N 1P7 Canada. Mon-Fri 9AM-5PM MST