Hi,
I had an error in my script:
line 25:
rm -rf ${DPATH/$x}/$i/Maildir/.spam/new/*
should be:
rm -rf ${DPATH}/$x/$i/Maildir/.spam/new/*
Regards,
Nick
>
> ~~ Begin spam-learn script ~~
> #!/bin/sh
> #
> # Script to feed sa-learn from selected users
> #
> # Add the selected users to userlist.txt in vpopmail
> # domain root. Add users on one line with one space
> # between names but, no space or line feed at the end
> # of the line.
> #
> # Add domains to domlist.txt in the same manner.
> #
> # Nick Hemmesch <[EMAIL PROTECTED]>
> # March 24, 2005
> #
>
> DPATH=/home/vpopmail/domains
> DLIST=${DPATH}/domlist.txt
> DLEARN=`cat ${DLIST}`
> for x in ${DLEARN}; do
> echo "Checking $x"
> USERLIST=${DPATH}/$x/userlist.txt
> SPAMUSER=`cat ${USERLIST}`
> for i in ${SPAMUSER}; do
> /usr/bin/sa-learn --spam ${DPATH}/$x/$i/Maildir/.spam/new/*
> ERROR -> rm -rf ${DPATH/$x}/$i/Maildir/.spam/new/*
> /usr/bin/sa-learn --spam ${DPATH}/$x/$i/Maildir/.spam/cur/*
> rm -rf ${DPATH}/$x/$i/Maildir/.spam/cur/*
> /usr/bin/sa-learn --spam ${DPATH}/$x/$i/Maildir/.ham/new/*
> rm -rf ${DPATH}/$x/$i/Maildir/.ham/new/*
> /usr/bin/sa-learn --spam ${DPATH}/$x/$i/Maildir/.ham/cur/*
> rm -rf ${DPATH}/$x/$i/Maildir/.ham/cur/*
> /usr/bin/sa-learn --sync
> done
> done
>
> exit 0
> ~~ End spam-learn script ~~
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]