[Mimedefang] sa-update (was: Seeing a lot of these lately)
Jonas Eckerman
jonas_lists at frukt.org
Sat Apr 22 13:50:37 EDT 2006
Nels Lindquist wrote:
>>> might try running sa-update. I was pleasantly surprised to see a
> Hm... on second glance, it would appear that SA called via MD isn't
> picking up the extra rules--my testing was done with command-line
> spamassassin.
U just checked into this.
By default, sa-update puts the new rukes in /var/lib/spamassassin/<version>.
Both spamd and spamassassin (in my ports installation on FreeBSD) sets the parameter LOCAL_STATE_DIR to '/var/lib' when constructing a new Mail::SpamAssassin.
mimedefang.pl oth doesn't set LOCAL_STATE_DIR at all, wich is probably why Mail::SpamAssassin doesn't find the new rules.
The following, *untested* code diff might be all that's needed to make it work:
---8<---
--- /usr/local/bin/mimedefang.pl Wed Mar 22 18:15:29 2006
+++ mimedefang.pl Sat Apr 22 19:46:23 2006
@@ -6408,6 +6408,7 @@
sub spam_assassin_init (;$) {
my($config) = @_;
my $LOCAL_RULES_DIR = "/usr/local/etc/mimedefang/spamassassin";
+ my $LOCAL_STATE_DIR = '/var/lib';
unless ($Features{"SpamAssassin"}) {
md_syslog('err', "$MsgID: Attempt to call SpamAssassin function, but SpamAssassin is not installed.");
@@ -6432,7 +6433,8 @@
local_tests_only => $SALocalTestsOnly,
dont_copy_prefs => 1,
userprefs_filename => $config,
- LOCAL_RULES_DIR => $LOCAL_RULES_DIR});
+ LOCAL_RULES_DIR => $LOCAL_RULES_DIR,
+ LOCAL_STATE_DIR => $LOCAL_STATE_DIR});
pop_status_tag();
}
---8<---
Note that I haven't checked thoroughly to see if the LOCAL_STATE_DIR parameter is used for anything else.
Regards
/Jonas
--
Jonas Eckerman, FSDB & Fruktträdet
http://whatever.frukt.org/
http://www.fsdb.org/
http://www.frukt.org/
More information about the MIMEDefang
mailing list