LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Checking Last time a user checked their mail? (Postfix) (https://www.linuxquestions.org/questions/linux-newbie-8/checking-last-time-a-user-checked-their-mail-postfix-730811/)

christopher_c 06-04-2009 11:24 PM

Checking Last time a user checked their mail? (Postfix)
 
Hello,

Im trying to figure out the last time a user had checked their email so I can weed out the inactive accounts.

I tried checking the /var/mail/*account* file on an account but wasnt able to see any sort of timestamp.

Im using postfix.

Any suggestions would be greatly appreciated ! :)

christopher_c 06-04-2009 11:38 PM

quick update:

I just used the following to grab all the logins in var/log/maillog , but not sure if this is correct or not
Code:

grep "imap-login: Login:" maillog

billymayday 06-05-2009 12:08 AM

Depends a bit on how long you keeps your logs for.

christopher_c 06-06-2009 02:57 AM

Yeah sadly it seemed to be only about 7 days...so no luck :(

noskoski 02-28-2019 08:32 AM

Track last user authentication (smtpd/submission)
 
Hi
Recently i made a daemon in python to track last user authentication when he send an email ( ports 465 and 587 ), ( see for yourselves https://github.com/noskoski/postfix_smtpd_last_auth/ ).
But if you want to track pop3/imap you may user post-login function from dovecot. https://wiki.dovecot.org/PostLoginScripting


All times are GMT -5. The time now is 03:00 PM.