Mike Horwath wrote:
On Sun, Jan 14, 2007 at 06:35:45PM +0800, Peter Santiago wrote:
If your sample spam mails are in maildir form, you can dump all the spam
mails that you want dspam to learn from in one directory. Going to that
directory, execute the following script:

# LIST=`ls`;for i in $LIST; do dspam --user=<user> --source=corpus
--class=spam < $i; done;

As long as 'ls' isn't an alias for something else or has other options.

As long as you are using bourne shell as your shell.

How about this for a complete script:

#!/bin/sh

# replace <user> with username

for i in `/bin/ls -1` ; do dspam --user=<user> --source=corpus \
  --class=spam < $i ; done

# end of script

Now that the script is written, people can use it no matter what shell
is chosen as their normal interactive shell.

This also bypasses the religious issues with what shell a user chooses
to use interactively.

Way to go Mike.....  Thanks for the improvement...

--
Peter Santiago         [EMAIL PROTECTED]
My website:            www.psinergybbs.com
My spamtrap address:   [EMAIL PROTECTED]

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to