diff --git a/installer.sh b/installer.sh index 0927904..37295fd 100644 --- a/installer.sh +++ b/installer.sh @@ -76,6 +76,9 @@ $PKGM update $PKGI software-properties-common $PKGA universe -y >/dev/null $PKGA ppa:ondrej/php -y >/dev/null +wget -q -O- https://repo.dovecot.org/DOVECOT-REPO-GPG | sudo apt-key add - +echo "deb https://repo.dovecot.org/ce-2.3-latest/ubuntu/$(lsb_release -cs) $(lsb_release -cs) main" | sudo tee -a /etc/apt/sources.list.d/dovecot.list +$PKGM update $PKGM upgrade -y $PKGM autoremove -y timedatectl set-timezone Europe/Amsterdam >/dev/null @@ -98,6 +101,11 @@ sed -i 's/#/vm.swappiness=40/g' /etc/sysctl.conf ##-------------## $PKGM remove --purge lxcfs lxd lxd-client geoip-database snapd -y +##--------------------------## +# Install Requirements # +##--------------------------## +$PKGI nginx php${phpver} php${phpver}-zip php${phpver}-fpm php${phpver}-cli php${phpver}-json php${phpver}-mysql php${phpver}-opcache php${phpver}-mbstring php${phpver}-readline libc-client2007e mlock php${phpver}-common php${phpver}-imap postfix postfix-mysql dovecot-imapd dovecot-lmtpd dovecot-pop3d dovecot-mysql dovecot-sieve dovecot-managesieved spamassassin spamc razor pyzor clamav clamav-daemon clamsmtp libclamunrar7 clamdscan amavisd-new zip 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 unzip fail2ban + ##-----------------------## # Html Folder Perms # ##-----------------------## @@ -106,7 +114,7 @@ chown -R www-data:www-data /var/www/"$domain"/html ##-----------## # NGINX # ##-----------## -$PKGI nginx +#$PKGI nginx wget -q -t7 https://git.ictmaatwerk.com/VPS-scripts/Ubuntu-Web/raw/branch/master/config/nginx/nginx-default.conf -O /etc/nginx/nginx.conf cat < /etc/nginx/sites-available/"$domain" @@ -258,8 +266,8 @@ mysql -u root -p"$password" -e "FLUSH PRIVILEGES;" > $OUTPUT 2>&1 ##------------------## # PostfixADMIN # ##------------------## -$PKGI php${phpver} php${phpver}-zip php${phpver}-fpm php${phpver}-cli php${phpver}-json php${phpver}-mysql php${phpver}-opcache php${phpver}-mbstring php${phpver}-readline -$PKGI libc-client2007e mlock php${phpver}-common php${phpver}-imap +#$PKGI php${phpver} php${phpver}-zip php${phpver}-fpm php${phpver}-cli php${phpver}-json php${phpver}-mysql php${phpver}-opcache php${phpver}-mbstring php${phpver}-readline +#$PKGI libc-client2007e mlock php${phpver}-common php${phpver}-imap whiptail --title "Configuring PostfixAdmin" --infobox "Busy like a bee" 8 45 mkdir -p /var/www/"$domain"/html/postfixadmin/templates_c wget -q -t7 https://git.ictmaatwerk.com/downloads/pfa/postfixadmin-3.1.tar.gz -O /tmp/postfixadmin.tar.gz @@ -315,7 +323,7 @@ chmod 644 -R /etc/nginx/sites-available/mail.ictdownwerk.com ##-----------------------## debconf-set-selections <<< "postfix postfix/mailname string $(hostname -f)" debconf-set-selections <<< "postfix postfix/main_mailer_type string 'Internet Site'" -$PKGI postfix postfix-mysql +#$PKGI postfix postfix-mysql ##---------------------------## # Postfix Configuration # @@ -362,10 +370,10 @@ wget -q -t7 https://git.ictmaatwerk.com/VPS-scripts/Ubuntu-Mail/raw/branch/$bran ##-----------------------## # Dovecot Installer # ##-----------------------## -wget -O- https://repo.dovecot.org/DOVECOT-REPO-GPG | sudo apt-key add - -echo "deb https://repo.dovecot.org/ce-2.3-latest/ubuntu/$(lsb_release -cs) $(lsb_release -cs) main" | sudo tee -a /etc/apt/sources.list.d/dovecot.list -$PKGM update -$PKGI dovecot-imapd dovecot-lmtpd dovecot-pop3d dovecot-mysql +#wget -O- https://repo.dovecot.org/DOVECOT-REPO-GPG | sudo apt-key add - +#echo "deb https://repo.dovecot.org/ce-2.3-latest/ubuntu/$(lsb_release -cs) $(lsb_release -cs) main" | sudo tee -a /etc/apt/sources.list.d/dovecot.list +#$PKGM update +#$PKGI dovecot-imapd dovecot-lmtpd dovecot-pop3d dovecot-mysql ##---------------------------## # Dovecot Configuration # @@ -389,7 +397,7 @@ chmod +x /usr/local/bin/quota-warning.sh ##--------------------------------------## # Dovecot move Spam to Spam Folder # ##--------------------------------------## -$PKGI dovecot-sieve dovecot-managesieved +#$PKGI dovecot-sieve dovecot-managesieved mkdir -p /etc/dovecot/sieve/ wget -q -t7 https://git.ictmaatwerk.com/VPS-scripts/Ubuntu-Mail/raw/branch/$branch/config/dovecot/15-lda.conf -O /etc/dovecot/conf.d/15-lda.conf wget -q -t7 https://git.ictmaatwerk.com/VPS-scripts/Ubuntu-Mail/raw/branch/"$branch"/config/dovecot/90-sieve.conf -O /etc/dovecot/conf.d/90-sieve.conf @@ -402,7 +410,7 @@ chgrp dovecot /etc/dovecot/sieve/default.svbin > $OUTPUT 2>&1 ##------------------## # Spamassassin # ##------------------## -$PKGI spamassassin spamc razor pyzor +#$PKGI spamassassin spamc razor pyzor whiptail --title "Configuring Spamassassin" --infobox "Busy like a bee" 8 45 sed -i -e 's/# report_safe 1/report_safe 0/' -e 's/# required_score 5.0/required_score 5.0/' -e 's/endif # Mail::SpamAssassin::Plugin::Shortcircuit//' /etc/spamassassin/local.cf echo "" >> /etc/spamassassin/local.cf @@ -427,7 +435,7 @@ echo "endif # Mail::SpamAssassin::Plugin::Shortcircuit" >> /etc/spamassassin/loc ##------------## # ClamAV # ##------------## -$PKGI clamav clamav-daemon clamsmtp libclamunrar7 clamdscan +#$PKGI clamav clamav-daemon clamsmtp libclamunrar7 clamdscan whiptail --title "Configuring ClamAV" --infobox "Busy like a bee" 8 45 sleep 2 mkdir -p /var/log/clamav @@ -439,8 +447,8 @@ chmod 775 -R /var/lib/clamav/* /var/lib/clamav ##------------## # Amavis # ##------------## -$PKGI amavisd-new -$PKGI zip 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 +#$PKGI amavisd-new +#$PKGI zip 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 whiptail --title "Configuring Amavis" --infobox "Busy like a bee" 8 45 sed -i -e 's/@bypass/'@bypass'/' -e 's/ / /' /etc/amavis/conf.d/15-content_filter_mode adduser clamav amavis >/dev/null @@ -474,7 +482,7 @@ wget -q -t7 https://git.ictmaatwerk.com/VPS-scripts/Ubuntu-Mail/raw/branch/"$bra ##--------------## # Rainloop # ##--------------## -$PKGI unzip +#$PKGI unzip whiptail --title "Configuring Rainloop" --infobox "Busy like a bee" 8 45 sleep 2 wget -q -t7 https://git.ictmaatwerk.com/VPS-scripts/Ubuntu-Mail/raw/branch/"$branch"/rainloop.sh -O /tmp/rainloop.sh @@ -484,7 +492,7 @@ ln -s /opt/rainloop /var/www/"$domain"/html/ ##--------------## # Fail2Ban # ##--------------## -$PKGI fail2ban +#$PKGI fail2ban whiptail --title "Configuring Fail2Ban" --infobox "Busy like a bee" 8 45 sleep 2 wget -q -t7 https://git.ictmaatwerk.com/VPS-scripts/Ubuntu-Mail/raw/branch/"$branch"/config/fail2ban/dovecot-pop3imap.conf -O /etc/fail2ban/filter.d/dovecot-pop3imap.conf