mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2024-01-19 02:48:50 +00:00
Merge pull request #1372 from phish108/shortcircuit-bayes-99-mini
activate SA shortcircuit features via env, fixes #1118 (again)
This commit is contained in:
commit
ae2aa6eeb4
16
README.md
16
README.md
|
@ -474,6 +474,22 @@ Note: this spamassassin setting needs `ENABLE_SPAMASSASSIN=1`. By default, the m
|
||||||
|
|
||||||
Note: this spamassassin setting needs `ENABLE_SPAMASSASSIN=1`
|
Note: this spamassassin setting needs `ENABLE_SPAMASSASSIN=1`
|
||||||
|
|
||||||
|
##### SA_SHORTCIRCUIT_BAYES_SPAM
|
||||||
|
|
||||||
|
- **1** => will activate spamassassin short circuiting for bayes spam detection.
|
||||||
|
|
||||||
|
This will uncomment the respective line in ```/etc/spamassasin/local.cf```
|
||||||
|
|
||||||
|
Note: activate this only if you are confident in your bayes database for identifying spam.
|
||||||
|
|
||||||
|
##### SA_SHORTCIRCUIT_BAYES_HAM
|
||||||
|
|
||||||
|
- **1** => will activate spamassassin short circuiting for bayes ham detection
|
||||||
|
|
||||||
|
This will uncomment the respective line in ```/etc/spamassasin/local.cf```
|
||||||
|
|
||||||
|
Note: activate this only if you are confident in your bayes database for identifying ham.
|
||||||
|
|
||||||
## Fetchmail
|
## Fetchmail
|
||||||
|
|
||||||
##### ENABLE_FETCHMAIL
|
##### ENABLE_FETCHMAIL
|
||||||
|
|
|
@ -1390,6 +1390,16 @@ function _setup_security_stack() {
|
||||||
else
|
else
|
||||||
sed -i -r 's/^\$sa_spam_subject_tag (.*);/\$sa_spam_subject_tag = '"'$SA_SPAM_SUBJECT'"';/g' /etc/amavis/conf.d/20-debian_defaults
|
sed -i -r 's/^\$sa_spam_subject_tag (.*);/\$sa_spam_subject_tag = '"'$SA_SPAM_SUBJECT'"';/g' /etc/amavis/conf.d/20-debian_defaults
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# activate short circuits when SA BAYES is certain it has spam.
|
||||||
|
if [ "$SA_SHORTCIRCUIT_BAYES_SPAM" = 1 ]; then
|
||||||
|
sed -i -r 's/^# shortcircuit BAYES_99/shortcircuit BAYES_99/g' /etc/spamassassin/local.cf
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$SA_SHORTCIRCUIT_BAYES_HAM" = 1 ]; then
|
||||||
|
sed -i -r 's/^# shortcircuit BAYES_00/shortcircuit BAYES_00/g' /etc/spamassassin/local.cf
|
||||||
|
fi
|
||||||
|
|
||||||
test -e /tmp/docker-mailserver/spamassassin-rules.cf && cp /tmp/docker-mailserver/spamassassin-rules.cf /etc/spamassassin/
|
test -e /tmp/docker-mailserver/spamassassin-rules.cf && cp /tmp/docker-mailserver/spamassassin-rules.cf /etc/spamassassin/
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue