MailCleaner + Exchange + IMAP Bayes Training

Users tips and ideas

Moderators: FlorianB, Pascal, bourgeois, mentor

msweany
Posts: 52
Joined: Thu Nov 30, 2006 3:21 pm

Postby msweany » Wed Jan 09, 2008 4:03 pm

To those that are using the imap bayes training on spamassassin.

I have been looking into options to either start using the bogofilter included or export the spamassassin training that has been done over the past year or so into bogofilter.

From the bogofilter site, this looks like it would work for a good initial traing before the switch to nice bayes.

For those that no more about this then me, would this work?

How can I use SpamAssassin to train Bogofilter?
If you have a working SpamAssassin installation (or care to create one), you can use its return codes to train bogofilter. The easiest way is to create a script for your MDA that runs SpamAssassin, tests the spam/non-spam return code, and runs bogofilter to register the message as spam (or non-spam). The sample procmail recipe below shows one way to do this:

BOGOFILTER = "/usr/bin/bogofilter"
BOGOFILTER_DIR = "training"
SPAMASSASSIN = "/usr/bin/spamassassin"

:0 HBc
* ? $SPAMASSASSIN -e
#spam yields non-zero
#non-spam yields zero
| $BOGOFILTER -n -d $BOGOFILTER_DIR
#else (E)
:0Ec
| $BOGOFILTER -s -d $BOGOFILTER_DIR

:0fw
| $BOGOFILTER -p -e

:0:
* ^X-Bogosity:.Spam
spam

:0:
* ^X-Bogosity:.Ham
non-spam
User avatar
Klug
Posts: 126
Joined: Fri Nov 17, 2006 1:19 pm
Contact:

Postby Klug » Tue Feb 12, 2008 9:33 am

Would this learning script work with a folder full of forwarded (as attachement) spams and ham ?
User avatar
vasco.debian
Posts: 10
Joined: Sat Jan 19, 2008 2:10 pm

Errors / warning while running script.

Postby vasco.debian » Wed Mar 19, 2008 3:18 pm

Hi,

I am getting following errors on running the imap-sa-learn.pl script.

Looking in spam folder Main
Learning on spam message 464131869
config: invalid regexp for rule OEM_SPAM: /Reinstall OEM with different media???/i: Nested quantifiers in regex; marked by <-- HERE in m/(?i)Reinstall OEM with different media??? <-- HERE /

Learned tokens from 0 message(s) (1 message(s) examined)
Deleting Spam Message 464131869
Learning on spam message 464131870
config: invalid regexp for rule OEM_SPAM: /Reinstall OEM with different media???/i: Nested quantifiers in regex; marked by <-- HERE in m/(?i)Reinstall OEM with different media??? <-- HERE /
.....
....
...


and it goes on and on ....
Is script working properly ????
I am confused with the problem :roll:

- Meghanand
edicom
Posts: 1
Joined: Fri Sep 12, 2008 1:07 pm

Re: MailCleaner + Exchange + IMAP Bayes Training

Postby edicom » Fri Sep 12, 2008 1:48 pm

hello
i configure this script , but i need that any user use his own inbox and spam folder
how can i do that ?

thanks
User avatar
vasco.debian
Posts: 10
Joined: Sat Jan 19, 2008 2:10 pm

Re: MailCleaner + Exchange + IMAP Bayes Training

Postby vasco.debian » Wed Apr 08, 2009 8:23 am

Hi,

First thanks for this great tip,
I am using it since several months, but came across one prob, We are using 3 servers (1 master & 2 slaves) I have set up the script on all three servers.
I also created one spam account say spam@somewhere.com where we send spam mails for Bayes training.As all three servers are using the same account for bayes training each server learn different tokens (as mail get deleted after getting read).

Is a good idea to share bayes database between all three servers for proper bayes training.

Thanks & Regards,

Vasco
virtap
Posts: 3
Joined: Sun Jun 09, 2013 9:50 am
How did you hear about Mailcleaner: sourceforge

Re: MailCleaner + Exchange + IMAP Bayes Training

Postby virtap » Sun Jun 09, 2013 1:22 pm

This is an old post and I'd like to find this script and try to adapt it to exchange 2010.
Where can I find the lastest script for exchange public folder? thanks
Matteo

Return to “Tips”

Who is online

Users browsing this forum: No registered users and 2 guests