Hi Kelson,

thats makes more sense to me now.

Im just trying to figure out how to get he IP::Country plugin in to work. SA in debug mode checks this, but I cant get the data from SA to Defang to write into a header.
[27415] dbg: dns: dns_available set to yes in config file, skipping test
[27415] dbg: metadata: X-Spam-Relays-Trusted:
[27415] dbg: metadata: X-Spam-Relays-Untrusted:
[27415] dbg: metadata: X-Spam-Relays-Internal:
[27415] dbg: metadata: X-Spam-Relays-External:
[27415] dbg: plugin: Mail::SpamAssassin::Plugin::RelayCountry=HASH(0x8cbf82c) implements 'extract_metadata'
[27415] dbg: metadata: X-Relay-Countries:

So how would I get the MetaData to MD so that I can add a header?

Thanks

Gary


Kelson  
Sent by: [EMAIL PROTECTED]

14/06/2006 17:21

Please respond to
[email protected]

To
[email protected]
cc
Subject
Re: [Mimedefang] Passing Variables from SA to DF





Gary McLean wrote:
> My other issue is, im trying to add extra headers to scanned emails that
> Spam Assassin checks for. i.e. Ive tried adding the IS SPAM value and
> X-Relay-Countries but the header appears but the value is blank.. How do I
> get he value from the Spam_assassin_Check routing into DEFANG so that I can
> set the header?
...
> my($hits, $req, $names, $report, $countries, $isspam) =
> spam_assassin_check();

I had a similar problem where I wanted to retrieve the Bayes autolearn
status from SpamAssassin.

What you're trying won't work because spam_assassin_check only returns
four variables.  When you ask for six, the last two end up being
undefined.  (Perl is forgiving and makes them blank instead of blowing
up in your face like other languages would.)

What I ended up doing was copying the spam_assassin_check function from
mimedefang.pl and modifying it to return the values I needed.  In my
case it retrieves $status->get_autolearn_status() and makes that the
fifth item in the return value.  Then I replaced all instances of
spam_asssassin_check in my filter with spam_assassin_check_customized.

You'll probably need to look at either the SA docs or the SA code to
figure out what you can pull out of the object to get the country info.
 IS SPAM is probably in there too, but you could also calculate it by
checking whether $hits >= $req.

--
Kelson Vibber
SpeedGate Communications <www.speed.net>
_______________________________________________
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID.  You may ignore it.

Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list [email protected]
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang

_______________________________________________
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID.  You may ignore it.

Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list [email protected]
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang

Reply via email to