Running a CustomAction on High Scoring Spam

Julian Field MailScanner at ecs.soton.ac.uk
Thu May 1 08:48:06 IST 2008


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



Michael Mansour wrote:
> Hi,
>
> I have a perl script I would like to run on each High
> Scoring Spam that is detected by MailScanner.
>
> The current default behaviour for my
> high.scoring.spam.actions.rules file is:
>
> FromOrTo:       default                         delete
> store-spam header "X-Spam-Status: Yes"
>
> The perl script simply takes stdout piped into it, so
> I just need to do:
>
> # cat spam.eml | spam.pl
>
> for the script to work.
>
> What I'm hoping I can do is use the FromOrTo line
> above to call a CustomAction (if that is the right way
> to do this)
You can't have a Custom Function as the right-hand side value in a rule 
set. The Custom Function has to provide the result for the setting, so 
you would just have
High-Scoring Spam Actions = &MyCustomFunction
and your subroutine MyCustomFunction would return the value listing the 
actions to take for this message.
>  which will "cat" the spam email into my
> perl script.
>   
It is passed the message as an object. Take a look at the examples that 
are there already.
> I currently run the script nightly on the entire high
> scoring "spam" directory and I'd like to make that a
> little more real-time.
>
> Thanks for any suggestions.
>
> Michael.
>
>
>
>       Get the name you always wanted with the new y7mail email address.
> www.yahoo7.com.au/y7mail
>
>
>   

Jules

- -- 
Julian Field MEng CITP CEng
www.MailScanner.info
Buy the MailScanner book at www.MailScanner.info/store

Need help customising MailScanner?
Contact me!
Need help fixing or optimising your systems?
Contact me!
Need help getting you started solving new requirements from your boss?
Contact me!

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


-----BEGIN PGP SIGNATURE-----
Version: PGP Desktop 9.8.2 (Build 3005)
Comment: Use Enigmail to decrypt or check this message is legitimate
Charset: ISO-8859-1

wj8DBQFIGXW/EfZZRxQVtlQRApl7AKCyzpe8suDZwC8N5TeY5MMJZCavHQCg/SbN
IFeDTGtRWRGpIo/bdk+Fycs=
=XqJR
-----END PGP SIGNATURE-----

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



More information about the MailScanner mailing list