[Mimedefang] Changing SA DNS tests feature on and off

Oliver Schulze L. oliver at samera.com.py
Fri Jul 13 02:27:20 EDT 2007


Hi David,
will this idea work?

I create a global variable called $MySASpamTester just like $SASpamTester.
Then, just before calling:
spam_assassin_check();

I do something like this:
  my $SAtmp = \$SASpamTester;
  $SASpamTester = \$MySASpamTester;
  my($hits, $req, $names, $report) = spam_assassin_check();
  $MySASpamTester = \$SASpamTester ;

That is, temporarylly replacing the $SASpamTester with a SA object
that have DNS test enabled.
I don't know if perl will keep $SASpamTester point still in memory
when doing the swap.

I will call spam_assassin_check() only from filter_end()

Thanks
Oliver



David F. Skoll wrote:
> Oliver Schulze L. wrote:
>
>   
>> can I have 2 SA object per mimedefang.pl ?
>> One with DNS tests enable and one with DNS tests disabled.
>>     
>
> Yes, but then you need to call into the Mail::SpamAssassin methods
> yourself rather than using the built-in convenience functions.
>   

-- 
Oliver Schulze L.   | http://tinymailto.com/oliver  
Asuncion - Paraguay | http://www.solojuegos.mobi    




More information about the MIMEDefang mailing list