Hello David,

Monday, May 24, 2004, 8:04:37 AM, you wrote:

DG> I know it's not directly related to Spamassassin, but you folks are quite
DG> smart, so I thought I would see if you can see why my bash script doesn't
DG> seem to be cleaning out my spam.  The goal is to periodically clean out any
DG> messages that are older than 7 days.  Here it is.

DG> #!/bin/sh

DG> cd /home
DG> for i in */Maildir/.Spam ; do
DG>     find $i/{new,cur} -type f -mtime +7
DG> done | xargs -l -i rm -f

DG> The find part seems to ID all the older messages, but xargs doesn't seem to
DG> be removing them.  Any ideas?  Or a better approach?

I would replace your four lines with one:
> find /home/Maildir/.Spam/{new,cur} -type f -mtime +7 -print -exec rm {} \;
(remove the -print if you don't want a listing of the files being
deleted)

Bob Menschel



Reply via email to