procmail
[Top] [All Lists]

Re: expiring SPAM in Maildirs?

2008-07-29 11:45:54
On 28-Jul-2008, at 20:00, Michael J Wise wrote:
On Jul 28, 2008, at 1:52 PM, Professional Software Engineering wrote:
At 00:21 2008-07-26 +0200, Michelle Konzack wrote:

When I have found this option I have tried it and was realy impressed how fast it is... "ls" was capitulating since the command line was too
long.

'man xargs'

Once, I thought that was too complex a solution.
Now, I use it so many times a day, it's not funny.

That, plus a `find` in front of it ... Unlimited Power!

Well, since we've strayed a tad off-topic indulge me for a minute...

how would you do a find for all the files older than a given file?

For example, (dragging this somewhat back on topic) let's say we want to look at the date of the cur/ folder inside a maildir and expire all the spam that is older that that date + 30 days?

(effectively, this would expire spam that was 30 days from the last login)

we have:

find /path/to/.SPAM/ -type f -ctime +30 -exec rm {} \;

to expire the spam that is 30 days old

something like

find /path/to/.SPAM -type f -newercc +30 /path/to/cur -ls

but -newerXY doesn't appear to take a modifier like +30

Especially with directories with way too many files in them which, more and more, seems to be the norm.

We do love xargs :)

--
I'm no psychologist (although I play one when I'm picking up chicks
        over by the asylum)

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>