> On Jan 3, 2018, at 8:28 AM, huret deffgok <kada...@gmail.com> wrote: > > My Postfix 3.2.4 server is not a MX for domainB. > domainB is not in virtual_mailbox_domains. > > it is a MX for domainA which is in virtual_mailbox_domains. > > I have in my ldap some users with: > mailAlternateAddress=user@domainB
That setting means that the alternate address is a second address for the *same* mailbox. > my virtual_alias_maps ldap query filter is: > (|(mail=%s)(mailAlternateAddress=%s)) > And the result attribut is "mail" (always in @domainA). This is consistent with the above "mailAlternateAddress" semantics. > The problem is that if I send email to user@domainB from mynetworks > or being sasl_authenticated the email is locally delivered (in the > log: to=user@domainA , orig_to=user@domainB). This is correct behaviour. DO NOT set alternate addresses on local mailboxes that are foreign addresses to which mail should be delivered externally. In this example you would *delete* the mailAlternateAddress value "user@domainB" from the LDAP entry in question. What purpose does it serve other than to locally short-circuit mail delivery to the remote address (which you seem to not want)? -- Viktor.