From c760fdbbee0e5798e24410bdd147c02a545dd982 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xe=CC=81fir=20Destiny?= Date: Fri, 7 Oct 2016 19:42:59 +0200 Subject: [PATCH 1/3] no pop --- mailserver.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/mailserver.sh b/mailserver.sh index bf7bdb2..a4fa112 100755 --- a/mailserver.sh +++ b/mailserver.sh @@ -53,9 +53,7 @@ install_clamav() { install_restart() { service courier-authdeamon restart service courier-imap restart - service courier-pop restart service courier-imap-ssl restart - service courier-pop-ssl restart service exim4 restart } From d60c50bb896ddbd73e3352505d32a8084b777c13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xe=CC=81fir=20Destiny?= Date: Fri, 7 Oct 2016 19:47:43 +0200 Subject: [PATCH 2/3] """""""""" --- commands/exim_forwarddel.sh | 2 +- commands/exim_forwardlist.sh | 2 +- commands/exim_userdel.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/commands/exim_forwarddel.sh b/commands/exim_forwarddel.sh index dc9f1eb..b3448bc 100644 --- a/commands/exim_forwarddel.sh +++ b/commands/exim_forwarddel.sh @@ -7,4 +7,4 @@ read emailto DIR=/etc/exim4/forward sed -i "s/$emailto,//g" "$DIR/$emailfrom" -[[ ! -s $DIR/$emailfrom ]] && rm -f $DIR/$emailfrom +[[ ! -s "$DIR/$emailfrom" ]] && rm -f "$DIR/$emailfrom" diff --git a/commands/exim_forwardlist.sh b/commands/exim_forwardlist.sh index c45bb0b..cc319df 100644 --- a/commands/exim_forwardlist.sh +++ b/commands/exim_forwardlist.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash DIR=/etc/exim4/forward -for file in $DIR/* +for file in "$DIR/*" do echo "$file: $(cat $DIR/$file)" done diff --git a/commands/exim_userdel.sh b/commands/exim_userdel.sh index 567d132..2eb7160 100644 --- a/commands/exim_userdel.sh +++ b/commands/exim_userdel.sh @@ -7,6 +7,6 @@ read domain DIR=/etc/exim4/domains sed -i "/$username/d" "$DIR/$domain" -[[ ! -s $DIR/$domain ]] && rm -f $DIR/$domain +[[ ! -s "$DIR/$domain" ]] && rm -f "$DIR/$domain" userdb "$username@$domain" del makeuserdb From 43fb65050db91b19cf8dd94e9b56fcd7b3843c32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xe=CC=81fir=20Destiny?= Date: Fri, 7 Oct 2016 19:50:45 +0200 Subject: [PATCH 3/3] forgot the showdns --- commands/exim_showdns.sh | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 commands/exim_showdns.sh diff --git a/commands/exim_showdns.sh b/commands/exim_showdns.sh new file mode 100644 index 0000000..8546707 --- /dev/null +++ b/commands/exim_showdns.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +DNS=$(openssl rsa -in /etc/exim4/dkim.key -pubout) +DNS=$(echo ${DNS} | sed "s/ //g" | sed "s/.*Y-----\(.*\)-----E.*/\1/g") +echo -e '\t\t10800 IN MX 10 ' +echo -e '\t\t10800 IN TXT "v=spf1 a -all"' +echo -e '_domainkey\t10800 IN TXT "o=~; r=postmaster@"' +echo -e "x._domainkey\t10800 IN TXT \"v=DKIM1; k=rsa; p=${DNS}\"" +echo -e '_dmarc\t\t10800 IN TXT "v=DMARC1; p=quarantine"'