Noah,
> To take full advantage of amavisd-new's built in support for multiple
> instances with the -i flag, we need to be able to specify significantly
> different SpamAssassin configurations for different instances. For this we
> propose a global config variable, something like 'sa_local_dir'
> (sa_site_dir?), which, if specified, is passed to Mail::SpamAssassin->new
> as the site_rules_filename argument. The patch is trivial, 3 lines.
>
> By specifying sa_local_dir in config files included by specific instances,
> we can create a minimal amavsid-new (for milter) and full-featured
> amavisd-new on the same box. It's good for disabling a lot of heavy SA
> plugins, such as fuzzyocr.
>
> --- /usr/sbin/amavisd 2009-01-09 10:07:04.000000000 -0800
> +++ /usr/sbin/amavisd 2009-01-09 09:58:35.000000000 -0800
> @@ -343,7 +343,6 @@
> )],
> 'confvars' => # global settings (not per-policy, not per-recipient)
> [qw(
> - $sa_local_dir
> $myproduct_name $myversion_id $myversion_id_numeric $myversion_date
> $myversion $instance_name @additional_perl_modules
> $MYHOME $TEMPBASE $QUARANTINEDIR $quarantine_subdir_levels
> @@ -20218,8 +20217,6 @@
> };
> if ($sa_version_num < 3.001005 && !defined $sa_args->{LOCAL_STATE_DIR})
> { $sa_args->{LOCAL_STATE_DIR} = '/var/lib' } # don't ignore sa-update
> rules
> - if (defined $sa_local_dir)
> - { $sa_args->{site_rules_filename} = $sa_local_dir }
> my($spamassassin_obj) = Mail::SpamAssassin->new($sa_args);
> # $Mail::SpamAssassin::DEBUG->{rbl}=-3;
> # $Mail::SpamAssassin::DEBUG->{rulesrun}=4+64;
It took me a long time, but it will make it into 2.6.3 release:
- add global variables $sa_configpath and $sa_siteconfigpath (undef by
default), which are passed to SpamAssassin as options 'rules_filename'
and 'site_rules_filename' during its initialization call; this makes
it easier to run multiple instances of amavisd, each with a different
SpamAssassin configuration, using the same amavisd configurations file
by taking advantage of option -i; suggested by Noah Baker;
Mark
------------------------------------------------------------------------------
_______________________________________________
AMaViS-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/