On Fri, Nov 08, 2002 at 09:26:05PM -0500, Sam Varshavchik wrote:
> >>Check the mtime of ./Maildir/cur which will change on
> >>each login with new mail, via pop3, imap or webmail.
> >
> >... but only if they have received new mail?
> 
> No, but atime WILL change.

True. However that's not a very robust mechanism to rely on - for example,
simply running a 'find' across your mail spool could destroy all that
information. Also for efficiency I quite like to mount spools with the
'noatime' option (although that's really more of a benefit for news than
mail)

I have been looking for a good mechanism to find the last access time of a
mailbox, because I want to bounce incoming mail at RCPT TO time for those
which have not been accessed for more than X days (to stop spam accumulating
in inactive mailboxes), and then delete contents of mailboxes not accessed
for more than X+Y days.

Using the mtime on ./cur looks like a good mechanism for that. For
completeness all it needs is an extra check when opening a mailbox: if no
renames from new/ to cur/ have taken place, then call utimes("cur",NULL) to
update the timestamp.

Regards,

Brian.


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
courier-users mailing list
[EMAIL PROTECTED]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to