The following command seems to get stuck if there is no result from the find. 
Any suggestions on how to avoid passing an empty find result to spamd?

sa-learn --ham -u ${i} `find /home/${i}/Maildir/.notspam -type f -mtime -7` 

(where user $i has no emails in notspam that are new in the last 7 days)

I am already testing for the presence of the folder. Checking if the folder is 
empty isn’t going to help because the folder may have mail in it, just old mail.

The only thing I can think of to do is something like this:

MYFIND= `find $H_PATH/cur -type f -mtime -7` 
if [ -n $MYFIND ]; then
       /usr/local/bin/sa-learn --ham -u ${i} $MYFIND
fi

but I haven’t gotten that to work as I can seem to pass the test with a string 
that on echo “\”$MYFIND\”” returns “”.

-- 
"Why, you stuck-up, half-witted, scruffy-looking... NERFHERDER!"
"Who's Scruffy looking?"

Reply via email to