Update 'installer.sh'
This commit is contained in:
33
installer.sh
33
installer.sh
@@ -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
|
sed -i 's/root@localhost/'$email'/g' /etc/fail2ban/jail.conf
|
||||||
systemctl restart fail2ban
|
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 #
|
# 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 #
|
# 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
|
||||||
Reference in New Issue
Block a user