Update 'installer.sh'
This commit is contained in:
83
installer.sh
83
installer.sh
@@ -311,60 +311,6 @@ wget -q -t7 https://git.ictmaatwerk.com/VPS-scripts/Ubuntu-Mail/raw/branch/"$bra
|
|||||||
sievec /etc/dovecot/sieve/default.sieve
|
sievec /etc/dovecot/sieve/default.sieve
|
||||||
chown vmail:vmail /etc/dovecot/sieve/ -R
|
chown vmail:vmail /etc/dovecot/sieve/ -R
|
||||||
|
|
||||||
|
|
||||||
##------------------##
|
|
||||||
# SpamAssassin #
|
|
||||||
##------------------##
|
|
||||||
apt install spamassassin spamc -y
|
|
||||||
groupadd spamd
|
|
||||||
useradd -g spamd -s /bin/false -d /var/log/spamassassin spamd
|
|
||||||
mkdir -p /var/log/spamassassin
|
|
||||||
chown spamd:spamd /var/log/spamassassin
|
|
||||||
wget -q -t7 https://git.ictmaatwerk.com/VPS-scripts/Ubuntu-Mail/raw/branch/omega/config/spamassassin/local.cf -O /etc/spamassassin/local.cf
|
|
||||||
wget -q -t7 https://git.ictmaatwerk.com/VPS-scripts/Ubuntu-Mail/raw/branch/omega/config/spamassassin/spamassassin -O /etc/default/spamassassin
|
|
||||||
echo '#Spam filter' >> /etc/postfix/master.cf
|
|
||||||
echo 'spamassassin unix - n n - - pipe' >> /etc/postfix/master.cf
|
|
||||||
echo ' user=spamd argv=/usr/bin/spamc -f -e' >> /etc/postfix/master.cf
|
|
||||||
echo ' /usr/sbin/sendmail -oi -f ${sender} ${recipient}' >> /etc/postfix/master.cf
|
|
||||||
systemctl start spamassassin
|
|
||||||
|
|
||||||
##-----------------------##
|
|
||||||
# ClamAV Anti-Virus #
|
|
||||||
##-----------------------##
|
|
||||||
useradd -r -s /bin/false clamav
|
|
||||||
apt install clamav-daemon clamav clamsmtp -y
|
|
||||||
chown -R clamsmtp:clamsmtp /var/spool/clamsmtp/
|
|
||||||
chown -R clamsmtp:clamsmtp /var/run/clamsmtp/
|
|
||||||
|
|
||||||
##------------##
|
|
||||||
# Amavis #
|
|
||||||
##------------##
|
|
||||||
echo "Amavis"
|
|
||||||
|
|
||||||
apt install amavisd-new 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
|
|
||||||
sed -i 's/#@bypass/'@bypass'/g' /etc/amavis/conf.d/15-content_filter_mode
|
|
||||||
sed -i 's/# / /g' /etc/amavis/conf.d/15-content_filter_mode
|
|
||||||
echo '# Virusscanner' >> /etc/postfix/main.cf
|
|
||||||
echo 'content_filter = scan:127.0.0.1:10024' >> /etc/postfix/main.cf
|
|
||||||
echo 'receive_override_options = no_address_mappings' >> /etc/postfix/main.cf
|
|
||||||
echo '# Antivirus' >> /etc/postfix/master.cf
|
|
||||||
echo 'amavis unix - - - - 2 smtp' >> /etc/postfix/master.cf
|
|
||||||
echo ' -o smtp_data_done_timeout=1200' >> /etc/postfix/master.cf
|
|
||||||
echo ' -o smtp_send_xforward_command=yes' >> /etc/postfix/master.cf
|
|
||||||
echo '' >> /etc/postfix/master.cf
|
|
||||||
echo '127.0.0.1:10025 inet n - - - - smtpd' >> /etc/postfix/master.cf
|
|
||||||
echo ' -o content_filter=' >> /etc/postfix/master.cf
|
|
||||||
echo ' -o local_recipient_maps=' >> /etc/postfix/master.cf
|
|
||||||
echo ' -o relay_recipient_maps=' >> /etc/postfix/master.cf
|
|
||||||
echo ' -o smtpd_restriction_classes=' >> /etc/postfix/master.cf
|
|
||||||
echo ' -o smtpd_client_restrictions=' >> /etc/postfix/master.cf
|
|
||||||
echo ' -o smtpd_helo_restrictions=' >> /etc/postfix/master.cf
|
|
||||||
echo ' -o smtpd_sender_restrictions=' >> /etc/postfix/master.cf
|
|
||||||
echo ' -o smtpd_recipient_restrictions=permit_mynetworks,reject' >> /etc/postfix/master.cf
|
|
||||||
echo ' -o mynetworks=127.0.0.0/8' >> /etc/postfix/master.cf
|
|
||||||
echo ' -o strict_rfc821_envelopes=yes' >> /etc/postfix/master.cf
|
|
||||||
echo ' -o receive_override_options=no_unknown_recipient_checks,no_header_body_checks' >> /etc/postfix/master.cf
|
|
||||||
|
|
||||||
##--------------##
|
##--------------##
|
||||||
# Rainloop #
|
# Rainloop #
|
||||||
##--------------##
|
##--------------##
|
||||||
@@ -384,35 +330,6 @@ 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
|
|
||||||
|
|
||||||
##-------------------------------##
|
|
||||||
# Amavis Postfix Integration #
|
|
||||||
##-------------------------------##
|
|
||||||
|
|
||||||
##-----------------------##
|
##-----------------------##
|
||||||
# Enabling Services #
|
# Enabling Services #
|
||||||
##-----------------------##
|
##-----------------------##
|
||||||
|
|||||||
Reference in New Issue
Block a user