[Mimedefang] HELP! At end of my rope with MD/SA

James Ebright jebright at esisnet.com
Wed Jul 6 17:06:23 EDT 2005


On Mon, 4 Jul 2005 11:46:30 -0400 (EDT), Dirk the Daring wrote

> 	if ($Features{"SpamAssassin"})
> 
> constructions as the default filter does, MD works fine.
> 
>    If I add
> 
> 	$Features{'SpamAssassin'} = 1;
> 
> to mimedefang-filter, so I can eliminate the "if $Features" logic and
> simplify my -filter file, I get the following error:
> 
>      Can't locate object method "new" via package "Mail::SpamAssassin"
>      (perhaps you forgot to load "Mail::SpamAssassin"?) at     
> /opt/mimedefang/bin/mimedefang.pl line 6177.     Compilation failed 
> in require at /opt/mimedefang/bin/mimedefang.pl     line 4881.

Hmm... the mimedefang.pl sets it like so: $Features{"SpamAssassin"} = 1;
inside an eval of whether or not the function exists doing a 'use
Mail::SpamAssassin ()' so that should be ok... when you do this are you
removing the if statement? if so why?, Also, why do this anyway... looking at
the mimedefang.pl SA will be turned on if it is available, off if it is not...

 if (!defined($Features{"SpamAssassin"})) {
            (eval 'use Mail::SpamAssassin (); $Features{"SpamAssassin"} = 1;')
                or $Features{"SpamAssassin"} = 0;


If you do not want the safe method of checking to see if SA is available
before running SA specific functions then just leave out the if statement.
Whether the if is there or not does not in any way specify whether or not SA
is "required" it merely prevents a section of code from running if SA is not
installed on the system in question.


Jim


--
EsisNet.com Webmail Client




More information about the MIMEDefang mailing list