<br><font size=2 face="sans-serif">Hi Kelson,</font>
<br>
<br><font size=2 face="sans-serif">thats makes more sense to me now.</font>
<br>
<br><font size=2 face="sans-serif">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.</font>
<br><font size=2 face="sans-serif">[27415] dbg: dns: dns_available set
to yes in config file, skipping test</font>
<br><font size=2 face="sans-serif">[27415] dbg: metadata: X-Spam-Relays-Trusted:
</font>
<br><font size=2 face="sans-serif">[27415] dbg: metadata: X-Spam-Relays-Untrusted:
</font>
<br><font size=2 face="sans-serif">[27415] dbg: metadata: X-Spam-Relays-Internal:
</font>
<br><font size=2 face="sans-serif">[27415] dbg: metadata: X-Spam-Relays-External:
</font>
<br><font size=2 face="sans-serif">[27415] dbg: plugin: Mail::SpamAssassin::Plugin::RelayCountry=HASH(0x8cbf82c)
implements 'extract_metadata'</font>
<br><font size=2 face="sans-serif">[27415] dbg: metadata: X-Relay-Countries:
</font>
<br>
<br><font size=2 face="sans-serif">So how would I get the MetaData to MD
so that I can add a header?</font>
<br><font size=2 face="sans-serif"><br>
Thanks</font>
<br><font size=2 face="sans-serif">Gary</font>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>Kelson </b> </font>
<br><font size=1 face="sans-serif">Sent by: mimedefang-bounces@lists.roaringpenguin.com</font>
<p><font size=1 face="sans-serif">14/06/2006 17:21</font>
<table border>
<tr valign=top>
<td bgcolor=white>
<div align=center><font size=1 face="sans-serif">Please respond to<br>
mimedefang@lists.roaringpenguin.com</font></div></table>
<br>
<td width=59%>
<table width=100%>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">To</font></div>
<td><font size=1 face="sans-serif">mimedefang@lists.roaringpenguin.com</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">Subject</font></div>
<td><font size=1 face="sans-serif">Re: [Mimedefang] Passing Variables from
SA to DF</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br>
<br><tt><font size=2>Gary McLean wrote:<br>
> My other issue is, im trying to add extra headers to scanned emails
that<br>
> Spam Assassin checks for. i.e. Ive tried adding the IS SPAM value
and<br>
> X-Relay-Countries but the header appears but the value is blank..
How do I<br>
> get he value from the Spam_assassin_Check routing into DEFANG so that
I can<br>
> set the header?<br>
...<br>
> my($hits, $req, $names, $report, $countries, $isspam) =<br>
> spam_assassin_check();<br>
<br>
I had a similar problem where I wanted to retrieve the Bayes autolearn
<br>
status from SpamAssassin.<br>
<br>
What you're trying won't work because spam_assassin_check only returns
<br>
four variables.  When you ask for six, the last two end up being <br>
undefined.  (Perl is forgiving and makes them blank instead of blowing
<br>
up in your face like other languages would.)<br>
<br>
What I ended up doing was copying the spam_assassin_check function from
<br>
mimedefang.pl and modifying it to return the values I needed.  In
my <br>
case it retrieves $status->get_autolearn_status() and makes that the
<br>
fifth item in the return value.  Then I replaced all instances of
<br>
spam_asssassin_check in my filter with spam_assassin_check_customized.<br>
<br>
You'll probably need to look at either the SA docs or the SA code to <br>
figure out what you can pull out of the object to get the country info.
<br>
  IS SPAM is probably in there too, but you could also calculate it
by <br>
checking whether $hits >= $req.<br>
<br>
-- <br>
Kelson Vibber<br>
SpeedGate Communications <www.speed.net><br>
_______________________________________________<br>
NOTE: If there is a disclaimer or other legal boilerplate in the above<br>
message, it is NULL AND VOID.  You may ignore it.<br>
<br>
Visit http://www.mimedefang.org and http://www.roaringpenguin.com<br>
MIMEDefang mailing list MIMEDefang@lists.roaringpenguin.com<br>
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang<br>
</font></tt>
<br>