Update 'installer.sh'

This commit is contained in:
b.waal
2019-09-01 14:16:16 +02:00
parent f5a154dcab
commit 7e3d408522

View File

@@ -330,34 +330,34 @@ 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
##------------##
# Amavis #
##------------##
#apt install amavisd-new -y
#sed -i -e 's/#@bypass/'@bypass'/' -e 's/# / /' /etc/amavis/conf.d/15-content_filter_mode
#echo "\$sa_spam_subject_tag = undef;" >> /etc/amavis/conf.d/50-user
#echo "\$spam_quarantine_to = undef;" >> /etc/amavis/conf.d/50-user
#echo "\$sa_tag_level_deflt = undef;" >> /etc/amavis/conf.d/50-user
#echo "" >> /etc/amavis/conf.d/50-user
#echo "# Prevent spams from automatically rejected by mail-server" >> /etc/amavis/conf.d/50-user
#echo "\$final_spam_destiny = D_PASS;" >> /etc/amavis/conf.d/50-user
#echo "" >> /etc/amavis/conf.d/50-user
#echo "# We need to provide list of domains for which filtering need to be done" >> /etc/amavis/conf.d/50-user
#echo "@lookup_sql_dsn = (" >> /etc/amavis/conf.d/50-user
#echo " ['DBI:mysql:database=postfixadmin;host=127.0.0.1;port=3306'," >> /etc/amavis/conf.d/50-user
#echo " 'postfixadmin'," >> /etc/amavis/conf.d/50-user
#echo " '$password']);" >> /etc/amavis/conf.d/50-user
#echo "" >> /etc/amavis/conf.d/50-user
#echo "\$sql_select_policy = 'SELECT domain FROM domain WHERE CONCAT("@",domain) IN (%k)';" >> /etc/amavis/conf.d/50-user
##-------------------##
# Amavis Filters #
##-------------------##
#apt install lrzip liblz4-tool lhasa arj unzip bzip2 nomarch cpio lzop cabextract arc apt-listchanges libauthen-sasl-perl libdbd-mysql-perl libdbi-perl libmail-dkim-perl ripole p7zip p7zip-full p7zip-rar rpm unrar unrar-free altermime libsnmp-perl libnet-ldap-perl libnet-ph-perl libnet-snpp-perl libnet-telnet-perl -y
##-------------------------------## ##-------------------------------##
# SpamAssassin Installation # # Amavis Postfix Integration #
##-------------------------------## ##-------------------------------##
apt install spamassassin spamc -y
##--------------------------------##
# SpamAssassin Configuration #
##--------------------------------##
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 "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 "# virus scanning" >> /etc/postfix/main.cf
echo "content_filter = scan:127.0.0.1:10025" >> /etc/postfix/main.cf
echo "receive_override_options = no_address_mappings" >> /etc/postfix/main.cf
##-----------------------## ##-----------------------##
# Enabling Services # # Enabling Services #