From 513c338a3f8c150c9c9aeda95da897ef7e1ae095 Mon Sep 17 00:00:00 2001 From: James Puleo Date: Sun, 30 Apr 2023 23:58:38 -0400 Subject: [PATCH] Use single-quotes to prevent interpolation when configuring Postfix Unless you intend to interpolate, you should never use double-quotes. In this instance, it was actually impactful -- `$myhostname` and `$mydomain` were meant to be left as-is, referring to those Postfix config parameters, but were accidentally interpolated and subsequently generating nonsense (but not fatal) configuration. --- emailwiz.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emailwiz.sh b/emailwiz.sh index 472a549..3f05b98 100644 --- a/emailwiz.sh +++ b/emailwiz.sh @@ -57,7 +57,7 @@ echo "Configuring Postfix's main.cf..." postconf -e "myhostname = $maildomain" postconf -e "mail_name = $domain" #This is for the smtpd_banner postconf -e "mydomain = $domain" -postconf -e "mydestination = $myhostname, $mydomain, mail, localhost.localdomain, localhost, localhost.$mydomain" +postconf -e 'mydestination = $myhostname, $mydomain, mail, localhost.localdomain, localhost, localhost.$mydomain' # Change the cert/key files to the default locations of the Let's Encrypt cert/key postconf -e "smtpd_tls_key_file=$certdir/privkey.pem"