From bb543700f5d15b724d91c27ecd93e65e13c415e2 Mon Sep 17 00:00:00 2001 From: downtownallday Date: Tue, 19 Oct 2021 08:15:28 -0400 Subject: [PATCH] Fix smart host alias (alias with no forward to's). Postfix recently started rejecting these mails with "Sender address rejected: domain not found". This ensures the special case is handled properly. --- setup/mail-users.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setup/mail-users.sh b/setup/mail-users.sh index c2458398..d6a08e01 100755 --- a/setup/mail-users.sh +++ b/setup/mail-users.sh @@ -180,9 +180,9 @@ bind = yes bind_dn = ${LDAP_POSTFIX_DN} bind_pw = ${LDAP_POSTFIX_PASSWORD} version = 3 -search_base = ${LDAP_DOMAINS_BASE} -query_filter = (&(|(dc=%s)(dcIntl=%s))(businessCategory=mail)) -result_attribute = dc +search_base = ${LDAP_BASE} +query_filter = (|(&(objectClass=mailDomain)(|(dc=%s)(dcIntl=%s)))(&(objectClass=mailGroup)(mail=@%s)(&(!(member=*))(!(mailMember=*))))) +result_attribute = objectClass EOF chgrp postfix /etc/postfix/virtual-mailbox-domains.cf chmod 0640 /etc/postfix/virtual-mailbox-domains.cf