Check that spamassassin is installed
This commit is contained in:
parent
494ffdbc98
commit
b3dcf0e172
|
@ -4455,6 +4455,10 @@ function spam_filtering {
|
|||
apt-get -y install exim4-daemon-heavy
|
||||
apt-get -y install spamassassin
|
||||
sa-update -v
|
||||
if [ ! -f /etc/default/spamassassin ]; then
|
||||
echo 'Spamassassin was not installed'
|
||||
exit 72570
|
||||
fi
|
||||
sed -i 's/ENABLED=0/ENABLED=1/g' /etc/default/spamassassin
|
||||
sed -i 's/# spamd_address = 127.0.0.1 783/spamd_address = 127.0.0.1 783/g' /etc/exim4/exim4.conf.template
|
||||
# This configuration is based on https://wiki.debian.org/DebianSpamAssassin
|
||||
|
@ -4598,9 +4602,9 @@ function spam_filtering {
|
|||
# this must be accessible by root
|
||||
chown -R $MY_USERNAME:root /home/$MY_USERNAME/.spamassassin
|
||||
|
||||
service spamassassin restart
|
||||
service exim4 restart
|
||||
service cron restart
|
||||
systemctl restart spamassassin
|
||||
systemctl restart exim4
|
||||
systemctl restart cron
|
||||
|
||||
echo 'spam_filtering' >> $COMPLETION_FILE
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue