From ff9f5c745698521414bcda34265a5a7c9b571e8c Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Sat, 20 Jun 2020 15:43:27 -0400 Subject: non-communicative commit message --- emailwiz.sh | 46 ++++++++++++++++++++++++++++++---------------- 1 file changed, 30 insertions(+), 16 deletions(-) (limited to 'emailwiz.sh') diff --git a/emailwiz.sh b/emailwiz.sh index 582fa0f..84082dc 100755 --- a/emailwiz.sh +++ b/emailwiz.sh @@ -40,11 +40,13 @@ which opendkim-genkey >/dev/null 2>&1 || apt install opendkim-tools domain="$(cat /etc/mailname)" subdom="mail" maildomain="$subdom.$domain" +certdir="/etc/letsencrypt/live/$maildomain" -# Determine location of ssl certificate from common names. -for x in /etc/letsencrypt/live/$maildomain /etc/letsencrypt/live/mail /etc/letsencrypt/live/$domain; do - [ -d "$x" ] && certdir="$x" && break -done +[ ! -d "$certdir" ] && echo "Note! You must first have a HTTPS/SSL Certificate for $maildomain. + +Use Let's Encrypt's Certbot to get that and then rerun this script. + +You may need to set up a dummy $maildomain site in nginx or Apache for that to work." # NOTE ON POSTCONF COMMANDS @@ -271,15 +273,27 @@ for x in dovecot postfix opendkim spamassassin; do done pval="$(tr -d "\n" "$HOME/dns_emailwizard" + +echo " _ _ +| \ | | _____ ___ +| \| |/ _ \ \ /\ / (_) +| |\ | (_) \ V V / _ +|_| \_|\___/ \_/\_/ (_) +Add these three records to your DNS TXT records on either your registrar's site +or your DNS server: + +$dkimentry +$dmarcentry +$spfentry + +Also saving these to ~/dns_emailwizard in case you want them in a file. + +Once you do that, you're done! Check the README for how to add users/accounts and how to log in." -- cgit v1.2.3-70-g09d2