On Tue, Mar 26, 2024 at 02:20:55PM -0400, Wietse Venema via Postfix-users wrote: > Viktor Dukhovni via Postfix-users: > > That's fine, the SRV records can be keyed by destination domain. > > Locally-managed SRV records, keyed by the final destination domain > name, to select a local relay host?
Yes. The only tricky part is getting the queries to go to the right zone, which requires appending a suffix to the nexthop domain. So a socketmap transport lookup that maps: foo.example -> dnslb:foo.example.dnslb.local:smtp and a custom DNS authoritative server handling "dnslb.local" (or other suitable suffix). To have separate load-balanced transport per-sender, one could have sender_dependent_transport: example.com dnslb1 example.net dnslb2 ... And the socketmap would then leave the transport unchanged, and tweak just the nexthop: foo.example -> :foo.example.dnslb.local:smtp Encoding both the sender domain and the recipient domain into a single lookup, as with the policy service, is otherwise difficult, so if all mail is single-recipient, one might use FILTER, and still SRV lookups on the backend: sender domain: belongs to client1 recipient = ...@example.net action = FILTER dnslb:example.net.client1.dnsbl.local Then the DNS server can parse out the destination and client id and do as it pleases. -- Viktor. _______________________________________________ Postfix-users mailing list -- postfix-users@postfix.org To unsubscribe send an email to postfix-users-le...@postfix.org