Hello All,

I'm running Cyrus as my IMAP server 
(Cyrus+Postfix+Amavis_ClamAV+Spamassassin+Web-Cyradm).

I've wrote a script for reporting spam to Razor DB and teaching with it 
Bayesian DB, revoking false positives from Razor DB and teaching Bayesian DB 
with false positives.

It looks like this (didn't test it yet, waiting for your suggestions), had to 
do it this way (for i in *.) cause Razor manual says that more than one 
non-mbox mail cannot be read from stdin: 


#!/bin/bash

#######Razor stuff###############

##########Revoking############
cd /ham_folder/
chmod 644 *.
for i in *.;
do
echo Revoking $i
su vscan -c "(/usr/lib/razor-revoke $i)"
done
echo Razor Revoke Completed!
###########Reporting###########
cd /spam_folder/
chmod 644 *.
for i in *.;
do
echo Reporting $i
su vscan -c "(/usr/lib/razor-report $i)"
done
echo Razor Reporting Completed!

###########Bayesian stuff###########
su vscan -c "(sa-learn --showdots --spam /spam_folder/)"
su vscan -c "(sa-learn --showdots --ham /ham_folder/"

###########Cleaning spam folder from learned emails########### su cyrus -c 
"(/usr/lib/cyrus/bin/ipurge -d0 -f user/spamkiller/spam)"

####End of the script#######


What I'm missing is a proper way of resending false positives (located now in 
/ham_folder/).
Should I also add the sender to a whitelist? If yes how?

How should I remove SA headers (how exactly?) and resend ham in the proper way?
Any sample code would be very welcome.
 


Best Regards
Leon Kolchinsky




Leon Kolchinsky

Reply via email to