You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Rick Measham <ri...@measham.id.au> on 2005/06/13 10:19:15 UTC

[SPAM] Passing parameters to a plugin

I have written a plugin that determines a spam according the the 
recipient address. I accept email to rickm-hexval@isite.net.au where 
hexval is the expiry time of the address as a hex'd epoch time.

My questions may be better served on the devel list, but I'm new here :)

Here's my rule:
header TIMED_RECIPIENT eval:check_timed_recipient()

Now I'd like my rule to be something like this:
header TIMED_RECIPIENT_1 eval:check_timed_recipient($RECIPIENT, 1)

In this rule, there are parameters passed to the plugin, however I can't 
get it to work.

Firstly, I made up the $RECIPIENT variable. Is there any way to get the 
recipient? I imagine there is because the rule is loaded from the 
recipient's home directory.

The second problem is more fundamental: My parameters are not finding 
their way into @_ in the check_timed_recipient function. I've looked at 
the other plugins and there seems to be no difference between what I'm 
doing and what they're doing.

(The second parameter is the allowance in hours. This enables me to give 
a higher score depending on HOW long ago the address expired)

Thanks and Cheers!
Rick Measham