Generic spam plug-in

Julian Field MailScanner at ecs.soton.ac.uk
Mon Jun 6 21:05:52 IST 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Current thoughts are a function call (with timeout wrapper). It gets 
passed the smtp client ip, the sender and the list of recipients, and a 
ref to an array of lines holding the entire message. The function simply 
returns a number which is added to the spam score along with the 
SpamAssassin score. You can replace SpamAssassin completely by just 
using the generic wrapper and setting "Use SpamAssassin = no". If the 
timeout happens, the score contribution is just 0.

I should also provide some sample code which calls an external program 
to produce the result score. My code will probably just output

smtp client ip address (IPv4 or IPv6)
sender address
recipient address
next recipient address...
blank line
message contents

It will expect one line of input which will either be the return code 
from the program or the contents of the 1 line of output it produces 
which should be a number. I'll provide samples for both, up to you which 
you use.

MailScanner.conf controls should be
Use Custom Spam Detector = yes/no
Custom Spam Detector Function = <name-of-function-call-here>

That should be all you need.
What do you think?

Dennis Willson wrote:

> If I could only have one I would prefer command-line. However couldn't 
> there be a flag to indicate which mode a filter uses?
> Also I'm hoping that multiple plug-ins are allowed... I want to write 
> one and I may find that billy-bob wrote one I would like to include as 
> well.
> I also would prefer a score, That's the most flexible... If I want 
> pass/fail I just make it always return a super high score.
>
> THANKS!!
>
>
> Julian Field wrote:
>
>>-----BEGIN PGP SIGNED MESSAGE-----
>>Hash: SHA1
>>
>>If I write you folks a generic way of adding in a spam-processing 
>>plugin, how would you like it to work?
>>A command-line or a function call?
>>How do you want the envelope data? (client ip, sender, recipients)
>>
>>Returns a spam yes/no flag, or a score to add to SpamAssassin?
>>Or a yes/no flag with a configurable score in MailScanner.conf?
>>
>>How do you actually want this interface to work?
>>
>>P.S. Do my PGP-signed list postings look okay?
>>
>>- -- 
>>Julian Field
>>www.MailScanner.info
>>Buy the MailScanner book at www.MailScanner.info/store
>>Professional Support Services at www.MailScanner.biz
>>MailScanner thanks transtec Computers for their support
>>
>>PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654
>>
>>
>>-----BEGIN PGP SIGNATURE-----
>>Version: PGP Desktop 9.0.1 (Build 2185)
>>
>>iQA/AwUBQqHsfhH2WUcUFbZUEQKwFQCfWsqhGU1ygJCbIpArZKL7ZcugOVYAn3RC
>>dMdSQsxMGcrL51Ei8fikXSaM
>>=a9hr
>>-----END PGP SIGNATURE-----
>>
>>------------------------ MailScanner list ------------------------
>>To unsubscribe, email jiscmail at jiscmail.ac.uk with the words:
>>'leave mailscanner' in the body of the email.
>>Before posting, read the Wiki (http://wiki.mailscanner.info/) and
>>the archives (http://www.jiscmail.ac.uk/lists/mailscanner.html).
>>
>>Support MailScanner development - buy the book off the website!
>>  
>>
>
> -- 
> ------------------------------------------------------------------------
> */Dennis Willson/*
> taz at taz-mania.com <mailto:taz at taz-mania.com>
> taz at scubatech.org <mailto:taz at scubatech.org>
>
> www.taz-mania.com <http://www.taz-mania.com>
>
> Ham: 	KA6LSW
> GMRS: 	WPSJ953
> SCUBA: 	Rescue, Wreck, Night, EANx, Nitrox Blender, UW Photographer, 
> Equip, Altitude
>
> Life should not be a journey to the grave with the intention of 
> arriving safely in a nice looking and well preserved body, but rather 
> to skid in broadside, thoroughly used up, totally worn out, and loudly 
> proclaiming, "WOW! WHAT A RIDE!"
>
> ------------------------ MailScanner list ------------------------
> To unsubscribe, email jiscmail at jiscmail.ac.uk with the words:
> 'leave mailscanner' in the body of the email.
> Before posting, read the Wiki (http://wiki.mailscanner.info/)
> and the archives (http://www.jiscmail.ac.uk/lists/mailscanner.html).
>
> *Support MailScanner development - buy the book off the website!* 


- -- 
Julian Field
www.MailScanner.info
Buy the MailScanner book at www.MailScanner.info/store
Professional Support Services at www.MailScanner.biz
MailScanner thanks transtec Computers for their support

PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654


-----BEGIN PGP SIGNATURE-----
Version: PGP Desktop 9.0.1 (Build 2185)

iQA/AwUBQqSsoRH2WUcUFbZUEQKyiwCgn2vDRab/O4Xhe2sOMxydr+Rlf5sAoIkx
ZuXAewbiwgkyVRJU7QMRJdaH
=e1fj
-----END PGP SIGNATURE-----

------------------------ MailScanner list ------------------------
To unsubscribe, email jiscmail at jiscmail.ac.uk with the words:
'leave mailscanner' in the body of the email.
Before posting, read the Wiki (http://wiki.mailscanner.info/) and
the archives (http://www.jiscmail.ac.uk/lists/mailscanner.html).

Support MailScanner development - buy the book off the website!




More information about the MailScanner mailing list