| Email General questions, webmail, mailing lists. |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread |
|
|
#10 (permalink) |
|
Registered User
Fresh Surpasser
Joined in Sep 2004
16 posts
Gave thanks: 0
Thanked 0 times
|
I am a little confused as to how I am supposed to customize this script for my environment. Here's how I had everything set up with the old mbox script:
Code:
#!/bin/sh echo "Learning zSPAM" for FILE in `find $HOME -name zSPAM -print` do echo "Processing $FILE" sa-learn --spam --mbox $FILE rm $FILE touch $FILE done echo "Learning zHAM" for FILE in `find $HOME -name zHAM -print` do echo "Processing $FILE" sa-learn --ham --mbox $FILE rm $FILE touch $FILE done echo "Done" |
|
|
|
|
|
#11 (permalink) | |
|
Surpass Fan
Comfy Contributor
Joined in Feb 2004
Lives in Norfolk, England
Hosted on Pass32
167 posts
Gave thanks: 23
Thanked 19 times
|
Quote:
Sorry you've found configuring my script confusing. Looking at your previous scripts code I think you need these variables: MYSPAM=.zSPAM MYHAM=.zHAM (and MYLEARNSPAM=.zLEARNSPAM) I take it you put false-negatives into your zSPAM folder? If that is the case, you can just delete the section of code that deals with the learnspam folders (see below). It makes no difference to the learning process (I just found it easier to keep count of how many false-negatives my users were getting by keeping them separate from caught spam). Code:
echo ""
echo "Learning from uncaught SPAM"
for SPAMFOLDER in `find $HOME/mail -name $MYLEARNSPAM -print`
do
echo -e "\n\t$SPAMFOLDER"
[snipped code]
mv -f --target-directory=$SPAMDIR $SPAM_FILES
fi
done
Regards Jonathan
__________________
Server: Pass32 and dedicated server |
|
|
|
|
|
|
#13 (permalink) | |
|
Surpassing Dutch
Super #1
Joined in Sep 2004
Hosted on SH98
2,556 posts
Gave thanks: 189
Thanked 45 times
|
Nevermind me.. It looks like I finally managed it
Quote:
__________________
sh98
|
|
|
|
|
|
|
#14 (permalink) |
|
Surpass Fan
Comfy Contributor
Joined in Feb 2004
Lives in Norfolk, England
Hosted on Pass32
167 posts
Gave thanks: 23
Thanked 19 times
|
Hello Edwin,
I have created a new account on my server and created a test email account with spam, learnspam and ham folders (all three are empty). Here is what the output should be like: Code:
Running jicoweb.com spam assassin training script
JicoScript learnspam script 0.6.20070609
SpamAssassin version 3.2.1
Currently running as user: demo
Checking spam and ham repositories exist...
/home/demo/spamdb exists!
/home/demo/hamdb exists!
Learning from SPAM
/home/demo/mail/example.com/testuser/.spam
no verified spam to learn!!
not enough old spam!!
Learning from uncaught SPAM
/home/demo/mail/example.com/testuser/.learnspam
no spam messages to learn from!!
Learning HAM
/home/demo/mail/example.com/testuser/.ham
no ham messages to learn from!!
Synchronising spam database
Done
Code:
# 1. spammassassin spam delivery folder name MYSPAM=.spam # 2. learning spam (spam that arrived in the inbox, missed by spamassassin MYLEARNSPAM=.learnspam # 3. ham (spam which got marked as spam when it was a genuine email MYHAM=.ham Cheers Jonathan
__________________
Server: Pass32 and dedicated server |
|
|
|
|
|
#16 (permalink) |
|
Surpassing Dutch
Super #1
Joined in Sep 2004
Hosted on SH98
2,556 posts
Gave thanks: 189
Thanked 45 times
|
Doh... I forgot... Thought it would run because it was in the same location. Didn't think of the /HOME thingy .. Changed it now though.
__________________
sh98
|
|
|
|
|
|
#17 (permalink) | |
|
Surpassing Dutch
Super #1
Joined in Sep 2004
Hosted on SH98
2,556 posts
Gave thanks: 189
Thanked 45 times
|
Damn.. Now I'm getting this:
Quote:
__________________
sh98
|
|
|
|
|
|
|
#18 (permalink) |
|
Surpass Fan
Comfy Contributor
Joined in Jun 2003
Lives in Denver
Hosted on D9
142 posts
Gave thanks: 4
Thanked 3 times
|
Okay, I'm testing this out on one of my domains. I ran the cron job just now, and I got this result...
Code:
Running jicoweb.com spam assassin training script JicoScript learnspam script 0.6.20070609 SpamAssassin version 3.2.1 Currently running as user: ******** Checking spam and ham repositories exist... Learning from SPAM Learning from uncaught SPAM Learning HAM Synchronising spam database expired old bayes database entries in 34 seconds 124948 entries kept, 49202 deleted token frequency: 1-occurrence tokens: 70.03% token frequency: less than 8 occurrences: 18.18% Done Here are my user-configurable variables... Code:
# BEGIN USER CONFIGURABLE VARIABLES # # The following two variables store where spam and ham are moved to once SPAMDIR=$HOME/spamdb HAMDIR=$HOME/hamdb # Please change the values of these variables to the name of the folders you use for # 1. spammassassin spam delivery folder name MYSPAM=SPAM # 2. learning spam (spam that arrived in the inbox, missed by spamassassin MYLEARNSPAM=SPAM # 3. ham (spam which got marked as spam when it was a genuine email MYHAM=HAM
__________________
"In the end, everything will be fine - if it is not fine, it is not the end." PseudoSwedelarvez.com Dime9 |
|
|
|