Re: How to use Procmail to remove messages from server after x number of days

LuKreme <[email protected]>
Newsgroups gmane.mail.procmail
Message-ID <[email protected]>
On 1-Mar-2011, at 12:23, Tim Rice wrote:
> 
> On 3/2/2011 1:12 AM, LuKreme wrote:
>> find /home/*/Maildir/.SPAM/{cur,new} -type f -ctime +7 -delete
> 
> find /usr/boxes/rice/computerstuff.net/old/ -type f -mtime +10 -exec rm {} \;
> 
> I was going to test this on a new test box but after seeing your post I'm curious about the -ctime and -delete vs -mtime and -rm? Also, How can I be sure I'm using Maildir and not Mboxes?

ctime is the create time on the file, mtime is the modified time. Since I am deleting only spam message, I don't care when the message was last looked at, if it's int hat folder and was created 7 days ago, it's gone.

-exec rm {} \; is simply a long way of spawning a shell and executing rm for old, OLD versions of find that don't have -delete.


-- 
I have as much authority as the Pope, I just don't have as many people
who believe it.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.