[Tracker-discuss] [issue105] Dealing with spam
Richard Jones
metatracker at psf.upfronthosting.co.za
Fri Mar 23 02:15:30 CET 2007
Richard Jones added the comment:
On Thu, 22 Mar 2007, Skip Montanaro wrote:
> I'm happy to take a stab at trying my SpamBayes submission filter. I have
> no idea how to get at the Roundup code or how to deal with the website user
> interface. Pointers appreciated.
The only existing information I have is in the Roundup wiki:
http://www.mechanicalcat.net/tech/roundup/wiki/AntiSpam
In slightly more concrete terms, you would have to make three modifications:
1. Pass all incoming email through spambayes to score it. I don't know enough
about spambayes to really say, but I guess the simplest approach here would
be to write a custom incoming-mail script that combines a spambayes scorer
and a Roundup mail gateway. Both would be relatively simple scripts. I've
included a sketch of that below.
2. Add a "score" attribute onto the msg class attached to issues. This is a
simple edit of the tracker's schema.py
3. Add a new web action that allows you to train UNSURE mail as HAM or SPAM.
See the Roundup customisation doc for info about writing new actions, and
there's also a bunch of examples in the Roundup wiki.
Please don't hesitate to ask further questions here or on the roundup-users
mailing list.
Richard
def process_mail():
# obtain a message (as a string) -- maybe re-purpose some code from
# roundup.mailgw?
message = obtain_mail()
# faked command-line args
args = []
# score with spambayes
# store the score on the message in the tracker
score = spambayes.score(message)
if score is in the SPAM range:
return
else:
args.append(('-S', 'score=%s'%score))
# open tracker
import roundup.instance
instance = roundup.instance.open(instance_home)
db = instance.open('admin')
handler = mailgw.MailGW(instance, db, args)
handler.main(message)
handler.db.close()
_______________________________________________________
Meta Tracker <metatracker at psf.upfronthosting.co.za>
<http://psf.upfronthosting.co.za/roundup/meta/issue105>
_______________________________________________________
More information about the Tracker-discuss
mailing list