Update 'installer.sh'

This commit is contained in:
b.waal
2019-09-01 00:58:59 +02:00
parent 4b28016b77
commit 295651bec3

View File

@@ -335,12 +335,41 @@ wget -q -t7 https://git.ictmaatwerk.com/VPS-scripts/Ubuntu-Mail/raw/branch/"$bra
sed -i 's/root@localhost/'$email'/g' /etc/fail2ban/jail.conf
systemctl restart fail2ban
##-------------------------------##
# SpamAssassin Installation #
##-------------------------------##
apt install spamassassin spamc -y
##--------------------------------##
# SpamAssassin Configuration #
##--------------------------------##
echo "Listen: 127.0.0.1:10025" >> /etc/clamsmtpd.conf
echo "OutAddress: 10026" >> /etc/clamsmtpd.conf
echo "# A header to add to all scanned email" >> /etc/clamsmtpd.conf
echo "Header: X-AV-Checked: ClamAV using ClamSMTP" >> /etc/clamsmtpd.conf
echo "# interface to spamassassin." >> /etc/postfix/master.cf
echo "spamassassin unix - n n - - pipe" >> /etc/postfix/master.cf
echo " user=nobody argv=/usr/bin/spamc -f -e" >> /etc/postfix/master.cf
echo " /usr/sbin/sendmail -oi -f ${sender} ${recipient}" >> /etc/postfix/master.cf
##-------------------------##
# ClamAV Installation #
##-------------------------##
apt install clamav clamsmtp -y
##--------------------------##
# ClamAV Configuration #
##--------------------------##
echo "# virus scanning" >> /etc/postfix/master.cf
echo "content_filter = scan:127.0.0.1:10025" >> /etc/postfix/master.cf
echo "receive_override_options = no_address_mappings" >> /etc/postfix/master.cf
##-----------------------##
# Enabling Services #
##-----------------------##
systemctl enable postfix.service postfix@-.service dovecot.service fail2ban.service
systemctl enable postfix.service postfix@-.service dovecot.service fail2ban.service clamav.service clamsmtp.service spamassassin.service
##-----------------------##
# Starting Services #
##-----------------------##
systemctl restart postfix.service postfix@-.service dovecot.service fail2ban.service
systemctl restart postfix.service postfix@-.service dovecot.service fail2ban.service clamav.service clamsmtp.service spamassassin.service