Thanks I am using 2.6.6 so I will use the second method
What should 'whatever' be in this example /etc/postfix/wildcard_relay_recipients: @idaho.sales.mycompany.com whatever And what did you mean by this? So it turns out the problem is not caused by the use of LDAP. -----Original Message----- From: owner-postfix-us...@postfix.org [mailto:owner-postfix-us...@postfix.org] On Behalf Of Wietse Venema Sent: Monday, May 16, 2016 3:01 PM To: Postfix users <postfix-users@postfix.org> Subject: Re: Exclude a sub domain from LDAP? Gomes, Rich: > I am calling the LDAP config this way in my main.cf file > > relay_recipient_maps = ldap:/etc/postfix/ldap_relay_recipients.cf, > ldap:/etc/postfix/ldap_groups_recipients.cf > > recipients file looks something like this: > > # Directory settings > domain = mycompany.com, sales.mycompany.com, someotherdomain.com, > yetanotherdomain.com server_host = internalldaphost.mycompany.com > search_base = dc=ldapdomain, dc=mycompany, dc=com version = 3 > > So idaho.sales.mycompany.com is not listed in the search, but any mail > routed there gets LDAP verified and therefore dropped since the > addresses are not vlaid in LDAP. (but they are on the application > server it is being routed to) If you want to disable recipient validation for idaho.sales.mycompany.com, you will need a wild-card match. Postfix 3.0 and later: relay_recipient_maps = inline:{@idaho.sales.mycompany.com=whatever} ldap:/etc/postfix/ldap_relay_recipients.cf ldap:/etc/postfix/ldap_groups_recipients.cf Postfix 2.11 and earlier: relay_recipient_maps = hash:/etc/postfix/wildcard_relay_recipients ldap:/etc/postfix/ldap_relay_recipients.cf ldap:/etc/postfix/ldap_groups_recipients.cf /etc/postfix/wildcard_relay_recipients: @idaho.sales.mycompany.com whatever So it turns out the problem is not caused by the use of LDAP. Wietse