Eric,
 
Thanks for the quick script 
 
it threw this error..
 
cleanspam.sh: line 14: /bin/ls: Argument list too long
 
 
Is there a command that we can run to just delete these without pumping them 
into sa-learn....
 
Thanks
Q

________________________________

From: news on behalf of Eric Shubert
Sent: Mon 12/8/2008 4:46 PM
To: qmailtoaster-list@qmailtoaster.com
Subject: Re: [qmailtoaster] Error Running qtp-clean-spam



That script really should be fixed. In the meantime, this should work:
(substitute <mydomain> appropriately)

for maildir in `ls -d /home/vpopmail/domains/<mydomain>/*/Maildir`; do
   shopt -s extglob
   for spamfile in `find $maildir/+(cur|new)/* 2>/dev/null`; do
     sudo -u vpopmail -H sa-learn --$learnas $spamfile
     rc=$?
     if [ $? != "0" ]; then
       echo "sa-learn failed, rc=$rc, spamfile=$spamfile"
       exit $rc
     fi
     rm $spamfile
   done
done

Please report back your result.

Kyle Quillen wrote:
> Well there are about 3000 accounts on this server so it is going to be pretty 
> hard to drill down which folder it is bombing on
> 
> thanks
> q
> 
>
> ________________________________
>
> From: Chris Hillman [mailto:[EMAIL PROTECTED]
> Sent: Mon 12/8/2008 1:49 PM
> To: qmailtoaster-list@qmailtoaster.com
> Subject: RE: [qmailtoaster] Error Running qtp-clean-spam
>
>
>
> Rather than modify the script, just create a temp imap folder... 'temp-spam' 
> or something and move half of the messages there temporarily. Run the script. 
> After completion move them back and run again.  Hopefully it will complete 
> successfully.
>
> 
>
> -Chris
>
> 
>
> From: Kyle Quillen [mailto:[EMAIL PROTECTED]
> Sent: Monday, December 08, 2008 11:41 AM
> To: qmailtoaster-list@qmailtoaster.com
> Subject: RE: [qmailtoaster] Error Running qtp-clean-spam
>
> 
>
> any insight on how to modify the script?  I do not know scripting all that 
> well and don't want to botch things
>
> 
>
> Thanks
>
> Q
>
> 
>
> 
>
> ________________________________
>
> From: Jake Vickers [mailto:[EMAIL PROTECTED]
> Sent: Mon 12/8/2008 1:36 PM
> To: qmailtoaster-list@qmailtoaster.com
> Subject: Re: [qmailtoaster] Error Running qtp-clean-spam
>
> Kyle Quillen wrote:
>
> Hello all,
>
> 
>
> When I try to run the qtp-clean-spam script it comes back with an error 
> message that finds argument list is too long.  Can anyone point in a 
> direction as to how to clear this up. 
>
>
> You have too many messages in one folder - you can either break the messages 
> up into 2 directories and learn them that way, or modify the script to use 
> another find command to pipe the output to the sa-learn command.
>
>
>
> ------------------------------------------------------------------------
>
> ---------------------------------------------------------------------
>      QmailToaster hosted by: VR Hosted <http://www.vr.org 
> <http://www.vr.org/> >
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


--
-Eric 'shubes'


---------------------------------------------------------------------
     QmailToaster hosted by: VR Hosted <http://www.vr.org <http://www.vr.org/> >
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



<<winmail.dat>>

---------------------------------------------------------------------
     QmailToaster hosted by: VR Hosted <http://www.vr.org>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to