Added spamassassin configuration.

This commit is contained in:
Thomas VIAL 2015-07-04 15:54:40 +02:00
parent a3634190b0
commit b4a07a21be

View file

@ -26,7 +26,6 @@ makeuserdb
echo "Regenerating 'virtual' for given aliases" echo "Regenerating 'virtual' for given aliases"
echo $docker_mail_aliases | sed -r 's/\[|\]|\x27|//g' | sed -r 's/, /\n/g' > /tmp/docker_mail_aliases echo $docker_mail_aliases | sed -r 's/\[|\]|\x27|//g' | sed -r 's/, /\n/g' > /tmp/docker_mail_aliases
echo "" > /etc/postfix/virtual
while IFS=$'|' read -r login aliases while IFS=$'|' read -r login aliases
do do
arr=$(echo $aliases | tr "," "\n") arr=$(echo $aliases | tr "," "\n")
@ -53,6 +52,12 @@ mkdir -p /var/log/clamav && chown -R clamav:root /var/log/clamav
echo "Creating /etc/mailname" echo "Creating /etc/mailname"
echo $docker_mail_domain > /etc/mailname echo $docker_mail_domain > /etc/mailname
echo "Configuring Spamassassin"
echo "required_hits 5.0" >> /etc/mail/spamassassin/local.cf
echo "report_safe 0" >> /etc/mail/spamassassin/local.cf
echo "required_score 5" >> /etc/mail/spamassassin/local.cf
echo "rewrite_header Subject ***SPAM***" >> /etc/mail/spamassassin/local.cf
echo "Starting daemons" echo "Starting daemons"
/etc/init.d/rsyslog start /etc/init.d/rsyslog start
/etc/init.d/fam start /etc/init.d/fam start