On Fri, 20 Sep 2002, Chuck Yerkes wrote to Chip Old:

> Quoting Chip Old ([EMAIL PROTECTED]):
> > We run this early every morning as a cron job, on the theory that
> > anyone who hasn't accessed his/her mail in 30 days isn't interested in
> > e-mail:
> >
> >   find /var/mail -atime +30 -print -exec rm {} \;
>
> Um, except that if they GET a message, that atime is updated.

Um, no it isn't.  mtime is, but atime is not.  atime is updated only when
the mailbox is read, not when it is written to.

> No, better is to look at the .$user.pop to see when they last logged in.

That assumes you don't delete .user.pop after a session ends.  That isn't
always practical.

> or a simple log parsing script that sees a user and sticks that username
> in a hash with the time.  At the end, it prints out the hash with the
> time (which will be the last access time).

Yes, that would work.  But why go to that trouble?  When the goal is to
delete mailboxes that haven't been accessed by their owners in over 30
days, "find /var/mail -atime +30 -print -exec rm {} \;" works perfectly.

-- 
Chip Old (Francis E. Old)             E-Mail:  [EMAIL PROTECTED]
Manager, BCPL Network Services        Phone:   410-887-6180
Manager, BCPL.NET Internet Services   FAX:     410-887-2091
320 York Road
Towson, MD 21204  USA

Reply via email to