wish list item (easy one :-)

Mariano Absatz mailscanner at LISTS.COM.AR
Fri Apr 4 22:28:49 IST 2003

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,

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.

More information about the MailScanner mailing list