initial commit of file from CVS for smeserver-spamassassin on Mon 10 Jul 08:42:51 BST 2023

This commit is contained in:
Brian Read
2023-07-10 08:42:51 +01:00
parent 582d2ee320
commit 7ae11e7fbd
50 changed files with 901 additions and 2 deletions

View File

@@ -0,0 +1 @@
all

View File

@@ -0,0 +1 @@
all

View File

@@ -0,0 +1 @@
medium

View File

@@ -0,0 +1 @@
enabled

View File

@@ -0,0 +1 @@
[SPAM]

View File

@@ -0,0 +1 @@
disabled

View File

@@ -0,0 +1 @@
5

View File

@@ -0,0 +1 @@
0

View File

@@ -0,0 +1 @@
disabled

View File

@@ -0,0 +1 @@
service

View File

@@ -0,0 +1,46 @@
{
my $sa = $DB->get("spamassassin") or return;
my %old2new = (
required_hits => "TagLevel",
skip_rbl_checks => "SkipRBLChecks",
sort_spam => "SortSpam",
use_bayes => "UseBayes",
);
for my $key (keys %old2new)
{
next unless (exists $spamassassin{$key});
my $value = $DB->get_prop_and_delete('spamassassin', $key);
$DB->set_prop('spamassassin', $old2new{$key}, $value);
}
my $sortspam = $DB->get_prop('spamassassin', 'SortSpam');
if ($sortspam eq "0" or $sortspam eq "1")
{
$DB->set_prop('spamassassin', 'SortSpam',
($sortspam eq "1") ? "enabled" : "disabled");
}
my $value = $DB->get_prop_and_delete('spamassassin', 'rewrite_subject');
if (defined $value)
{
$DB->set_prop('spamassassin', 'SubjectTag',
($value ? 'enabled' : 'disabled'));
}
# migrate only interesting value from spamd and delete it
my $spamd = $DB->get("spamd");
if ($spamd){
my $SpamLearning = $DB->get_prop('spamassassin', 'SpamLearning') || "empty";
if ( exists $spamd{'SpamLearning'} && ! exists $spamassassin{'SpamLearning'} ) {
$DB->set_prop('spamassassin', 'SpamLearning', $spamd{'SpamLearning'});
}
$spamd->delete;
}
}

View File

@@ -0,0 +1,11 @@
{
my $dt = $DB->get_prop("qmail", "DeliveryType");
my $di = $DB->get_prop("qmail", "DeliveryInstruction");
return unless ($dt and $di);
return unless ($dt eq 'program' and $di eq 'sortspam');
$DB->set_prop("qmail", "DeliveryType", "");
$DB->set_prop("qmail", "DeliveryInstruction", "");
}