SpamAssassin Install Prefix
Mariano Absatz
mailscanner at LISTS.COM.AR
Tue Apr 29 21:48:14 IST 2003
Hi Julian,
I installed SpamAssassin in an unusual place (say... /opt/SpamAssassin),
configured it in the options like:
SpamAssassin Install Prefix = /opt/SpamAssassin
and it didn't work... browsing the log I see repeatedly:
Apr 29 17:29:20 alerce2-or Alerce-MX[17638]: MailScanner E-Mail Virus Scanner
version 4.15-9 starting...
Apr 29 17:29:20 alerce2-or Alerce-MX[17638]: SpamAssassin installation could
not be found
and looking at SA.pm I see that you don't prepend the possibly modified
directory to the @INC array...
I did a quick & dirty patch that is perl-version dependent... but maybe you
can think of something better (the patch is against 4.15-9):
*** SA.pm.old Tue Apr 29 17:33:11 2003
--- SA.pm Tue Apr 29 17:37:34 2003
***************
*** 72,77 ****
--- 72,82 ----
unless (MailScanner::Config::IsSimpleValue('usespamassassin') &&
!MailScanner::Config::Value('usespamassassin')) {
+ $val = MailScanner::Config::Value('spamassassininstallprefix');
+ if ($val ne "") {
+ $settings{PREFIX} = $val;
+ push @INC, "$val/lib/perl5/site_perl/5.8.0";
+ }
MailScanner::Log::DieLog("SpamAssassin installation could not be
found")
unless eval "require Mail::SpamAssassin";
$settings{dont_copy_prefs} = 1; # Removes need for home directory
***************
*** 87,94 ****
$settings{LOCAL_RULES_DIR} = $val if $val ne "";
$val = MailScanner::Config::Value('spamassassindefaultrulesdir');
$settings{DEF_RULES_DIR} = $val if $val ne "";
- $val = MailScanner::Config::Value('spamassassininstallprefix');
- $settings{PREFIX} = $val if $val ne "";
$MailScanner::SA::SAspamtest = new Mail::SpamAssassin(\%settings);
#if ($prefs ne "") {
--- 92,97 ----
--
Mariano Absatz
El Baby
----------------------------------------------------------
Violence is the last refuge of the incompetent.
-- Isaac Asimov
More information about the MailScanner
mailing list