On Tue, Jul 11, 2006 at 12:13:22PM +0100, Chris Lear wrote: > >Does anybody know a good way to script sa-learn to daily check on junk > >e-mail folders? i'm currently trying the following line in a cron.daily > >script, but its throwing up an error: > > > >find /home/vpopmail/domains -name ".Junk E-mail" -exec sa-learn > >--showdots --spam cur {} \; > > Your --exec subcommand is the problem. The {} expands to the full path > of the found file. It doesn't change directory. A version that might work is
A bigger problem imo is that the file/path you're looking for contains a space, and {} doesn't quote that for you. It may be as easy as just putting single or double quotes around (see the find man page), but may involve something more complicated ala: find /home/vpopmail/domains -name ".Junk E-mail" -print0 | \ xargs -0 sa-learn --showdots --spam or however you want to deal with it. -- Randomly Generated Tagline: "My daddy shoots people!" --Ralph Wiggum Last Tap Dance in Springfield (Episode BABF15)
pgph1dGMNaAA9.pgp
Description: PGP signature