Hi Jake, Kyle and others,

Im trying to run a script on my box -

./spamscript: /root/.cpan/build/Mail-SpamAssassin-3.1.4/sa-learn: /usr/bin/perl: bad interpreter: Argument list too long

Does anyone have a solution so the script can run on large amounts of emails? Im trying to run it on about 990 emails and its bombing out, I expect to have more spam to run it on when the cron runs it.

Thanks

Jake Vickers <[EMAIL PROTECTED]> wrote:
Kyle Quillen wrote:
> How do I set that to look at all mail boxes would it be like this?
>
> #!/bin/sh
> find /home/vpopmail/domains/v2gnu.com/*/Maildir/cur/* -mtime +3 -exec
> rm -rf {} \;
> find /home/vpopmail/domains/v2gnu.com/*/Maildir/new/* -mtime +3 -exec
> rm -rf {} \;
>
How about something like this:

#!/bin/sh
locate Spam/ | grep -v S= | grep \/cur | uniq > /var/qmail/spam-folders
# moving to spam-clean file
# note: mtime is for how many days to leave the messages on the server
cat /var/qmail/spam-folders | awk '{print "find "$0"/ -type f -mtime 5
-exec rm -v {} \\; " };{ };{next}' > /var/qmail/spam-clean
sh /var/qmail/spam-clean



That's a quickly modified script that George had sent me a while back.

---------------------------------------------------------------------
QmailToaster hosted by: VR Hosted
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Send instant messages to your online friends http://au.messenger.yahoo.com

Reply via email to