[prev in list] [next in list] [prev in thread] [next in thread] 

List:       qmail
Subject:    Re: how to delete email with certain date
From:       Harald Hanche-Olsen <hanche () math ! ntnu ! no>
Date:       2008-04-28 8:04:59
Message-ID: 20080428.100459.111443051.hanche () math ! ntnu ! no
[Download RAW message or body]

+ Oliver Welter <mail@oliwel.de>:

> If you have shell access, a fast way to do is just a "find -type f
> - -ctime +XXX | xargs rm" on ypur mailfolders
> 
> This will remove all files/mails, where the files where created before
> the given offset. If you dont move around mails between different
> mailboxes, the file creation date should be the date of the first
> delivery to the final mailfolder.

Bzzt.  Unix has no concept of file creation time.  The ctime is the
time of the latest change to the file's inode.  (With the exception of
accessing the file, which updates the atime and hence the inode but
does not change the ctime.)  That said, in a maildir it is very
likely, though by no means guaranteed, that a file's modification time
(mtime) and (ctime) are both identical to the creation time - meaning
the time when mail delivery to the file was completed.

- Harald
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic