From d0e9ab61f929d435c53e51aea97dd0183af36e1c Mon Sep 17 00:00:00 2001 From: MGislv Date: Wed, 26 Jan 2022 10:11:27 +0000 Subject: [PATCH] Add 'mydestination' & remove obsolete 'smtpd_recipient_restrictions' --- emailwiz.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/emailwiz.sh b/emailwiz.sh index a0cd960..03f7f59 100644 --- a/emailwiz.sh +++ b/emailwiz.sh @@ -56,6 +56,9 @@ echo "Configuring Postfix's main.cf..." # Necessary to later start Postfix postalias /etc/postfix/aliases +# List of domains that this machine considers itself the final destination for +postconf -e 'mydestination = $myhostname, localhost.$mydomain, 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" postconf -e "smtpd_tls_cert_file=$certdir/fullchain.pem" @@ -92,9 +95,6 @@ postconf -e 'smtpd_sasl_auth_enable = yes' postconf -e 'smtpd_sasl_type = dovecot' postconf -e 'smtpd_sasl_path = private/auth' -# Sender and recipient restrictions -postconf -e 'smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination' - # Prevent IP address leaks (also removes ip from incoming email) postconf -e 'header_checks = regexp:/etc/postfix/header_checks'