summaryrefslogtreecommitdiff
path: root/emailwiz.sh
diff options
context:
space:
mode:
Diffstat (limited to 'emailwiz.sh')
-rwxr-xr-xemailwiz.sh12
1 files changed, 6 insertions, 6 deletions
diff --git a/emailwiz.sh b/emailwiz.sh
index 22b6b84..a5e7727 100755
--- a/emailwiz.sh
+++ b/emailwiz.sh
@@ -42,7 +42,7 @@ subdom=${MAIL_SUBDOM:-mail}
maildomain="$subdom.$domain"
certdir="/etc/letsencrypt/live/$maildomain"
-[ ! -d "$certdir" ] && certdir="$(dirname "$(certbot certificates 2>/dev/null | grep "$maildomain" -A 2 | awk '/Certificate Path/ {print $3}')")"
+[ ! -d "$certdir" ] && certdir="$(dirname "$(certbot certificates 2>/dev/null | grep "$maildomain\|*.$domain" -A 2 | awk '/Certificate Path/ {print $3}' | head -n1)")"
[ ! -d "$certdir" ] && echo "Note! You must first have a Let's Encrypt Certbot HTTPS/SSL Certificate for $maildomain.
@@ -220,17 +220,17 @@ cut -d: -f1 /etc/passwd | grep -q "^vmail" || useradd vmail
chown -R vmail:vmail /var/lib/dovecot
sievec /var/lib/dovecot/sieve/default.sieve
-echo "Preparing user authetication..."
+echo "Preparing user authentication..."
grep -q nullok /etc/pam.d/dovecot ||
echo "auth required pam_unix.so nullok
account required pam_unix.so" >> /etc/pam.d/dovecot
# OpenDKIM
-# A lot of the big name email services, like Google, will automatically
-# rejectmark as spam unfamiliar and unauthenticated email addresses. As in, the
-# server will flattly reject the email, not even deliverring it to someone's
-# Spam folder.
+# A lot of the big name email services, like Google, will automatically reject
+# as spam unfamiliar and unauthenticated email addresses. As in, the server
+# will flatly reject the email, not even delivering it to someone's Spam
+# folder.
# OpenDKIM is a way to authenticate your email so you can send to such services
# without a problem.