Sunil . <[EMAIL PROTECTED]> wrote:
> >No, there's no technical solution. You need an administrative solution,
> >such as telling your users "All messages will be deleted from the server
> >when they are X days old", where X is 7, or 10, or 3, or whatever fits.
> >You then set up a cronjob to look through all the user's
> >Maildir/{cur,new}/* and delete any file older than X days every night at
> >midnight or something.
> Just wondering, how do i check if a file (or a mail) is X days old.
This isn't a qmail question; it's a basic Unix question. In a Maildir, each
message is a separate file, and in Unix, files have attributes (such as ctime,
atime, mtime). In this case, you probably want to look at the ctime or mtime
(creation time or modification time) of the file, as that will tell you when
it was created, and therefore how old it is.
For use in cron scripts, etc, you probably want to look at `man test`.
Charles
--
-----------------------------------------------------------------------
Charles Cazabon <[EMAIL PROTECTED]>
GPL'ed software available at: http://www.qcc.sk.ca/~charlesc/software/
Any opinions expressed are just that -- my opinions.
-----------------------------------------------------------------------