Running a CustomAction on High Scoring Spam
MailScanner at ecs.soton.ac.uk
Thu May 1 08:48:06 IST 2008
-----BEGIN PGP SIGNED MESSAGE-----
Michael Mansour wrote:
> 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.
> Get the name you always wanted with the new y7mail email address.
Julian Field MEng CITP CEng
Buy the MailScanner book at www.MailScanner.info/store
Need help customising MailScanner?
Need help fixing or optimising your systems?
Need help getting you started solving new requirements from your boss?
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
-----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