On Thu, Jun 24, 2021 at 08:50:35AM +0200, Daniel Ryšlink wrote: > My question is this - transport table in Postfix allows matching by > address (user@domain), by domain itself, or the * wildcard can be used, > but what if I want to match mail from every domain that have a specific > server (ip) in their MX record?
This is not possible without dramatically redesigning Postfix to have a queue manager that is able to activate (import into the active queue, assigning messages to transports, ...) multiple incoming messages concurrently. While the queue manager orchestrates concurrent deliveries from the active queue, import of messages is serial, and performing high-latency (e.g. DNS) lookups during message import would make Postfix unusable. What you could attempt to do is alter DNS resolution of the A/AAAA records of the problem MX hosts to send the traffic to a separate Postfix instance on another machine where DNS is not mangled, and which would handle only the problem destinations. If applicable, also clean up your lists, and get whitelisted so that Microsoft accepts your traffic without friction. -- Viktor.