mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2025-08-04 10:05:00 +02:00
Fixes #79 and add spamassassin configuration variables (see README.md)
This commit is contained in:
parent
24e3b1286e
commit
59a6649f0e
4 changed files with 32 additions and 8 deletions
|
@ -182,12 +182,11 @@ echo "Creating /etc/mailname"
|
|||
echo $(hostname -d) > /etc/mailname
|
||||
|
||||
echo "Configuring Spamassassin"
|
||||
echo "required_score 5" >> /etc/spamassassin/local.cf
|
||||
echo "report_safe 0" >> /etc/spamassassin/local.cf
|
||||
echo "rewrite_header Subject ***SPAM***" >> /etc/spamassassin/local.cf
|
||||
SA_TAG=${SA_TAG:="2.0"} && sed -i -r 's/^\$sa_tag_level_deflt (.*);/\$sa_tag_level_deflt = '$SA_TAG';/g' /etc/amavis/conf.d/20-debian_defaults
|
||||
SA_TAG2=${SA_TAG2:="6.31"} && sed -i -r 's/^\$sa_tag2_level_deflt (.*);/\$sa_tag2_level_deflt = '$SA_TAG2';/g' /etc/amavis/conf.d/20-debian_defaults
|
||||
SA_KILL=${SA_KILL:="6.31"} && sed -i -r 's/^\$sa_kill_level_deflt (.*);/\$sa_kill_level_deflt = '$SA_KILL';/g' /etc/amavis/conf.d/20-debian_defaults
|
||||
cp /tmp/spamassassin/rules.cf /etc/spamassassin/
|
||||
|
||||
|
||||
echo "Configuring fail2ban"
|
||||
# enable filters
|
||||
perl -i -0pe 's/(\[postfix\]\n\n).*\n/\1enabled = true\n/' /etc/fail2ban/jail.conf
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue