wish list item (easy one :-)

Julian Field mailscanner at ecs.soton.ac.uk
Fri Apr 4 22:40:57 IST 2003


I obviously should have published these options after all :)

There are already 3 undocumented configuration options for setting the
location of SpamAssassin. They are:
SpamAssassin Local Rules Dir
SpamAssassin Default Rules Dir
SpamAssassin Install Prefix
A combination of those 3 will let you do what you need.

At 22:28 04/04/2003, you wrote:
>Hi Julian,
>
>today I was installing a new machine with MS+SA+ZMailer (with my yet to be
>sufficiently tested queue-fooling scripts).
>
>I installed SA in a non-standard place (esp. the rules directories), and
>found that the SA rules weren't found at all. As the standard spamassassin
>script _did_ find everything I browsed it and found the following:
>
>my $PREFIX = '/usr';  # substituted at 'make' time
>my $DEF_RULES_DIR = '/app/SpamAssassin/etc/rules/default';  # substituted at
>'make' time
>my $LOCAL_RULES_DIR = '/app/SpamAssassin/etc/rules/local';  # substituted at
>'make' time
>
>and then...
>
># create the tester factory
>   my $spamtest = new Mail::SpamAssassin ({
>     rules_filename      => $opt{'config-file'},
>     userprefs_filename => $opt{'prefs-file'},
>     local_tests_only    => $opt{'local'},
>     debug             => defined($opt{'debug-level'}),
>     dont_copy_prefs   => ($opt{'create-prefs'} ? 0 : 1),
>     PREFIX            => $PREFIX,
>     DEF_RULES_DIR     => $DEF_RULES_DIR,
>     LOCAL_RULES_DIR   => $LOCAL_RULES_DIR,
>   });
>
>
>I hardwired this into MailScanner/SA.pm like this:
>
>     if ($prefs ne "") {
>       $MailScanner::SA::SAspamtest = new Mail::SpamAssassin(
>                {'userprefs_filename' => $prefs,
>                 'PREFIX'            => '/usr',
>                 'DEF_RULES_DIR'     => '/app/SpamAssassin/etc/rules/default',
>                 'LOCAL_RULES_DIR'   => '/app/SpamAssassin/etc/rules/local',
>                 'dont_copy_prefs' => 0 });
>     } else {
>       $MailScanner::SA::SAspamtest = new Mail::SpamAssassin(
>                {'PREFIX'            => '/usr',
>                 'DEF_RULES_DIR'     => '/app/SpamAssassin/etc/rules/default',
>                 'LOCAL_RULES_DIR'   => '/app/SpamAssassin/etc/rules/local'});
>     }
>
>but it would be nice if you could add a couple of lines to Config.pm and
>ConfigDefs.pl with some new config variables like
>SpamAssassin prefix
>SpamAssassin default rules directory
>SpamAssassin local rules directory
>or something like that.
>
>If you want, I can modify your latest release and send you the patches...
>AFAIK, it would only touch three files...
>
>
>
>--
>Mariano Absatz
>El Baby
>----------------------------------------------------------
>Late one night in the middle of the day, two dead
>soldiers got up to fight. Back to back they faced
>each other, pulled out their swords and shot one
>another. A deaf policeman heard the noise, got up
>and shot the twice dead boys. If you don't believe
>me, ask the blind man who saw it all, through a
>knothole in a wooden brick wall.

--
Julian Field
www.MailScanner.info
Professional Support Services at www.MailScanner.biz
MailScanner thanks transtec Computers for their support



More information about the MailScanner mailing list