Seperated Postfix into submodule

This commit is contained in:
2020-10-14 15:04:50 +02:00
parent 0cb3113ede
commit b475a7f365
8 changed files with 25 additions and 21 deletions

View File

@@ -1,18 +1,3 @@
##-------------##
# Postfix #
##-------------##
sed -i 's/#inet_interfaces = all/inet_interfaces = loopback-only/g' /etc/postfix/main.cf
sed -i 's/mydestination/#mydestination/g' /etc/postfix/main.cf
sed -i 's/relayhost =/mydestination = '$hostname', localhost.'$hostname', '$hostname'/g' /etc/postfix/main.cf
echo "bounce_notice_recipient = info@$domain" >> /etc/postfix/main.cf
cat <<EOF > /etc/aliases
# See man 5 aliases for format
postmaster: root
root: $email
EOF
newaliases
##-------## ##-------##
# UFW # # UFW #
##-------## ##-------##

View File

@@ -1 +1 @@
mailutils htop ufw nload fail2ban htop ufw nload fail2ban

View File

@@ -54,5 +54,3 @@ echo "vm.vfs_cache_pressure=50" >> /etc/sysctl.conf
#Checking if postfix exists on this system and if so it wil be removed to prevent config conflicts #Checking if postfix exists on this system and if so it wil be removed to prevent config conflicts
if dpkg-query -Wf'${db:Status-abbrev}' postfix 2>/dev/null | grep -q '^i'; then apt purge -y postfix > $OUTPUT 2>&1; fi if dpkg-query -Wf'${db:Status-abbrev}' postfix 2>/dev/null | grep -q '^i'; then apt purge -y postfix > $OUTPUT 2>&1; fi
debconf-set-selections <<< "postfix postfix/mailname string $domain"
debconf-set-selections <<< "postfix postfix/main_mailer_type string 'Internet Site'"

View File

@@ -15,12 +15,14 @@ nginxCMSL+=("Wordpress:" "WordPress is a content management system based on PHP.
nginxCMSL+=("Nextcloud:" "Nextcloud is a suite of client-server software for creating and using file hosting services." OFF) nginxCMSL+=("Nextcloud:" "Nextcloud is a suite of client-server software for creating and using file hosting services." OFF)
#Options #Options
nginxOptions=("Redis:" "Redis caching" OFF) nginxOptions=("Redis:" "Redis caching" OFF)
nginxOptions+=("Postfix:" "Mail MTA" OFF)
##Nginx ##Nginx
#CMSList #CMSList
nginx_nonphpCMSL=("None:" "A plain webserver will be setup." OFF) nginx_nonphpCMSL=("None:" "A plain webserver will be setup." OFF)
#Options #Options
nginx_nonphpOptions=("Redis:" "Redis caching" OFF) nginx_nonphpOptions=("Redis:" "Redis caching" OFF)
nginx_nonphpOptions+=("Postfix:" "Mail MTA" OFF)
##Apache ##Apache
#CMSList #CMSList
@@ -29,6 +31,7 @@ apacheCMSL+=("Wordpress:" "WordPress is a content management system based on PHP
apacheCMSL+=("Nextcloud:" "Nextcloud is a suite of client-server software for creating and using file hosting services." OFF) apacheCMSL+=("Nextcloud:" "Nextcloud is a suite of client-server software for creating and using file hosting services." OFF)
#Options #Options
apacheOptions=("Redis:" "Redis caching" OFF) apacheOptions=("Redis:" "Redis caching" OFF)
apacheOptions+=("Postfix:" "Mail MTA" OFF)
fi fi
if [ $IMODE = l ]; then if [ $IMODE = l ]; then
@@ -39,18 +42,18 @@ webservers=("Nginx" "Nginx_nonphp" "Apache" "Quit")
#CMSList #CMSList
nginxCMSL=("None" "Wordpress" "Nextcloud") nginxCMSL=("None" "Wordpress" "Nextcloud")
#Options #Options
nginxOptions=("Redis:") nginxOptions=("Redis:" "Postfix:")
##Nginx-nonphp ##Nginx-nonphp
#CMSList #CMSList
nginx_nonphpCMSL=("None") nginx_nonphpCMSL=("None")
#Options #Options
nginx_nonphpOptions=("Redis:") nginx_nonphpOptions=("Redis:" "Postfix:")
##Apache ##Apache
#CMSList #CMSList
apacheCMSL=("None" "Wordpress" "Nextcloud") apacheCMSL=("None" "Wordpress" "Nextcloud")
#Options #Options
apacheOptions=("Redis:") apacheOptions=("Redis:" "Postfix:")
fi fi

View File

@@ -0,0 +1 @@
mailutils

View File

@@ -0,0 +1,14 @@
##-------------##
# Postfix #
##-------------##
sed -i 's/#inet_interfaces = all/inet_interfaces = loopback-only/g' /etc/postfix/main.cf
sed -i 's/mydestination/#mydestination/g' /etc/postfix/main.cf
sed -i 's/relayhost =/mydestination = '$hostname', localhost.'$hostname', '$hostname'/g' /etc/postfix/main.cf
echo "bounce_notice_recipient = info@$domain" >> /etc/postfix/main.cf
cat <<EOF > /etc/aliases
# See man 5 aliases for format
postmaster: root
root: $email
EOF
newaliases

View File

@@ -0,0 +1 @@
postfix

View File

@@ -0,0 +1,2 @@
debconf-set-selections <<< "postfix postfix/mailname string $domain"
debconf-set-selections <<< "postfix postfix/main_mailer_type string 'Internet Site'"