initial commit of file from CVS for smeserver-learn on Sat Sep 7 20:30:28 AEST 2024
This commit is contained in:
1
root/etc/e-smith/db/configuration/defaults/Learn/Verbose
Normal file
1
root/etc/e-smith/db/configuration/defaults/Learn/Verbose
Normal file
@@ -0,0 +1 @@
|
||||
enabled
|
1
root/etc/e-smith/db/configuration/defaults/Learn/cron
Normal file
1
root/etc/e-smith/db/configuration/defaults/Learn/cron
Normal file
@@ -0,0 +1 @@
|
||||
daily
|
1
root/etc/e-smith/db/configuration/defaults/Learn/type
Normal file
1
root/etc/e-smith/db/configuration/defaults/Learn/type
Normal file
@@ -0,0 +1 @@
|
||||
service
|
@@ -0,0 +1 @@
|
||||
disabled
|
@@ -0,0 +1 @@
|
||||
enabled
|
@@ -0,0 +1 @@
|
||||
enabled
|
@@ -0,0 +1 @@
|
||||
LearnAsHam
|
@@ -0,0 +1 @@
|
||||
disabled
|
@@ -0,0 +1 @@
|
||||
[HAM]
|
@@ -0,0 +1 @@
|
||||
service
|
@@ -0,0 +1 @@
|
||||
0
|
@@ -0,0 +1 @@
|
||||
disabled
|
@@ -0,0 +1 @@
|
||||
disabled
|
@@ -0,0 +1 @@
|
||||
|
@@ -0,0 +1 @@
|
||||
enabled
|
@@ -0,0 +1 @@
|
||||
LearnAsSpam
|
@@ -0,0 +1 @@
|
||||
disabled
|
@@ -0,0 +1 @@
|
||||
[SPAM]
|
@@ -0,0 +1 @@
|
||||
service
|
@@ -0,0 +1 @@
|
||||
disabled
|
@@ -0,0 +1 @@
|
||||
enabled
|
@@ -0,0 +1 @@
|
||||
enabled
|
1
root/etc/e-smith/db/configuration/defaults/LearnInWL/dir
Normal file
1
root/etc/e-smith/db/configuration/defaults/LearnInWL/dir
Normal file
@@ -0,0 +1 @@
|
||||
LearnInWL
|
@@ -0,0 +1 @@
|
||||
disabled
|
1
root/etc/e-smith/db/configuration/defaults/LearnInWL/tag
Normal file
1
root/etc/e-smith/db/configuration/defaults/LearnInWL/tag
Normal file
@@ -0,0 +1 @@
|
||||
[WL]
|
@@ -0,0 +1 @@
|
||||
service
|
@@ -0,0 +1 @@
|
||||
1
|
@@ -0,0 +1 @@
|
||||
enabled
|
20
root/etc/e-smith/events/actions/LearnSpam-init
Normal file
20
root/etc/e-smith/events/actions/LearnSpam-init
Normal file
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
# default is 0, if kept to 0 we can not play there
|
||||
/sbin/e-smith/db configuration setprop spamassassin UseBayes 1
|
||||
|
||||
# default is empty, we shall set it if we want to have a run
|
||||
/sbin/e-smith/config getprop spamassassin BayesAutoLearnThresholdSpam >/dev/null|| /sbin/e-smith/config setprop spamassassin BayesAutoLearnThresholdSpam 6.00
|
||||
/sbin/e-smith/config getprop spamassassin BayesAutoLearnThresholdNonspam >/dev/null|| /sbin/e-smith/config setprop spamassassin BayesAutoLearnThresholdNonspam 0.10
|
||||
|
||||
# we really need spamassassin running
|
||||
/sbin/e-smith/config setprop spamassassin status enabled
|
||||
|
||||
# default is 0 for no reject
|
||||
#/sbin/e-smith/config setprop spamassassin RejectLevel 12
|
||||
|
||||
# default is 5
|
||||
#/sbin/e-smith/config setprop spamassassin TagLevel 4
|
||||
|
||||
# default is medium
|
||||
#/sbin/e-smith/config setprop spamassassin Sensitivity custom
|
6
root/etc/e-smith/events/actions/LearnSpam-run
Normal file
6
root/etc/e-smith/events/actions/LearnSpam-run
Normal file
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
sa-learn --sync --dbpath /var/spool/spamd/.spamassassin -u spamd
|
||||
chown spamd.spamd /var/spool/spamd/.spamassassin/bayes_*
|
||||
chown spamd.spamd /var/spool/spamd/.spamassassin/bayes.mutex
|
||||
chmod 640 /var/spool/spamd/.spamassassin/bayes_*
|
1
root/etc/e-smith/templates.metadata/etc/cron.d/Learn
Normal file
1
root/etc/e-smith/templates.metadata/etc/cron.d/Learn
Normal file
@@ -0,0 +1 @@
|
||||
PERMS=0644
|
17
root/etc/e-smith/templates/etc/cron.d/Learn/Learn
Normal file
17
root/etc/e-smith/templates/etc/cron.d/Learn/Learn
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
my $freq = $Learn{cron} || 'none';
|
||||
my $min = int(rand(60));
|
||||
my $hour = int(rand(5));
|
||||
my $learn = '/usr/bin/Learn.pl';
|
||||
if ($freq eq 'hourly') {
|
||||
return "$min * * * * root $learn\n";
|
||||
} elsif ($freq eq 'daily') {
|
||||
return "$min $hour * * * root $learn\n";
|
||||
} elsif ($freq eq 'weekly') {
|
||||
return "$min $hour * * 0 root $learn\n";
|
||||
} elsif ($freq eq 'monthly') {
|
||||
return "$min $hour 15 * * root $learn\n";
|
||||
} else {
|
||||
return "# Learn auto-exec disabled\n";
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user