Leon Kolchinsky wrote: > 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? >
You're making it a lot harder for yourself. Take a look at the manual pages 'man 3 spamassassin' spamassassin -r < ... This performes bayes learning and reports message to razor, pyzor, DCC, and spamcop. spamassassin -k < ... This learns as ham and revokes message with razor. -- Chris ----------- Thanks Cris, What about resending false positives, after all filters learned that this is a ham, how should I resend these messages (on Cyrus system) to the original recipients? Any sample code would be very welcome :) Regards, Leon