1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- diff -r 8574935af18f amavisd
- --- a/amavisd Tue May 20 19:30:57 2008 +0200
- +++ b/amavisd-new-2.6 Thu Jun 12 12:49:08 2008 +0200
- @@ -339,6 +339,8 @@
- %admin_maps_by_ccat %warnrecip_maps_by_ccat
- %always_bcc_by_ccat %dsn_bcc_by_ccat
- %addr_extension_maps_by_ccat %addr_rewrite_maps_by_ccat
- +
- + $sa_site_rules_filename
- )],
- 'confvars' => # global settings (not per-policy, not per-recipient)
- [qw(
- @@ -20256,6 +20258,18 @@
- my($sa_version_num); # turn '3.1.8-pre1' into 3.001008
- $sa_version_num = sprintf("%d.%03d%03d", $1,$2,$3)
- if $sa_version =~ /^(\d+)\.(\d+)(?:\.(\d+))/; # ignore trailing non-digits
- +
- + my %conf_backup = ();
- + my ($sa_site_rule_file) = c('sa_site_rules_filename');
- +
- + if ($sa_site_rule_file && $sa_version_num >= 3) {
- + $spamassassin_obj->copy_config(undef, \%conf_backup) ||
- + die "config: error returned from copy_config!\n";
- + do_log(4,"SA Config saved");
- + $spamassassin_obj->read_scoreonly_config ($sa_site_rule_file);
- + do_log(4,"SA ScoreOnlyConfig loaded");
- + }
- +
- my($spam_level,$sa_tests,$spam_report,$spam_summary,%supplementary_info);
- my($fh) = $msginfo->mail_text;
- $fh->seek($msginfo->skip_bytes, 0) or die "Can't rewind mail file: $!";
- @@ -20330,6 +20344,11 @@
- } or do { $eval_stat = $@ ne '' ? $@ : "errno=$!" };
-
- $which_section = 'SA finish';
- + if ($sa_site_rule_file && $sa_version_num >= 3) {
- + $spamassassin_obj->copy_config(\%conf_backup, undef) ||
- + die "config: error returned from copy_config!\n";
- + do_log(4,"SA Config restored");
- + }
- if (defined $per_msg_status)
- { $per_msg_status->finish; undef $per_msg_status }
- if (defined $mail_obj && $sa_version_num >= 3)
|