Answer the question
In order to leave comments, you need to log in
How to correctly redirect messages from postfix to the right users in the right domains?
Good day.
There is a working mail system based on Postfix (front-end) and Exchange (back-end) within the same company.local forest. The forest has several domains by city, for example, msk.company.local, brn.company.local, etc. Each of the domains has many users and all have a mail attribute of the form [email protected]
When the letter arrives postfix'u LDAP request works. The GC searches for the user. If there is a user, then the letter is sent to Exchange, otherwise it is discarded.
Query:
debuglevel=0
version=3
server_host=ldap://company.local:3268
timeout=60
bind_dn=***@company.local
bind_pw=***
bind=yes
search_base=dc=company,dc=local
scope= sub
query_filter = (&(proxyAddresses=smtp:%s)(!(userAccountControl:1.2.840.113556.1.4.803:=2))(|(objectClass=user)(objectClass=group)(objectClass=contact)(objectClass=publicFolder )(objectClass=msExchDynamicDistributionList)))
result_format = %s
result_attribute = cn
dereference = 0
special_result_attribute =
cache = no
The path to Exchange is specified in the postfix transport file, transport_maps = hash:/etc/postfix/transport. (transport file - company.ru<------>smtp:[192.168.1.100])
Everything works fine, since there is only one server and everyone connects to it. But, the task is to make a distribution based on CG, that is, a server in each domain. And everything would be fine.
That's just how to tell postfix'u to forward letters addressed to users in the correct domain?
From the user's request to AD, I can take the userPrincipalName, which contains the domain (for example, [email protected], and the mail attribute is [email protected]) and place it in the result_attribute of the request. Then write an additional line in transport, for example, msk.company.local<------>smtp:[192.168.5.100].
But, most likely, due to the fact that all addresses contain company.ru, the forwarding goes only to Exchange.
It is desirable to resolve the issue without compiling a local list of alias'ov. The option to make addresses like msk.company.ru is also not suitable.
TOTAL: How to redirect the letter to the server in whose domain the user is located?
Thank you.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question