On Thu, Jun 10, 2021 at 04:30:11PM +0200, Michael Storz wrote: > The next possibility would be to split the email into emails with > recipients from the same domain. Unfortunately, Postfix (currently) has > no way of configuring a relay host and specifying that the email should > be split according to the same recipient domain.
A socketmap(5) or tcp_table(5) transport(5) table can map each recipient domain (e.g., some.domain.example) into a common parent with a wildcard A record: # Domain part of key # Returned result some.domain.example smtp:[some.domain.example.wild.local]:10025 [ The code performing this mapping should validate the domain syntax, returning no result for unexpected input syntax. ] The local nameserver would be authoritative for "wild.local" zone, which apart from any zone apex SOA and NS RRs would have: *.wild.local. IN A 127.0.0.1 In a multi-instance configuration, the input instance could use such a transport table to split the envelope of every message before handing it off to the output instance. > The last option is to split the email into single recipient emails. Then > there is no need to differentiate. You can use either single-instance or > multi-instance Postfix installations to do this. We use single instance. > Postfix has the TRANSPORT_destination_recipient_limit option (replace > TRANSPORT with the name of the transport you are using) to split an > email according to the number of recipients. If set to 1, you will > receive single recipient emails. Worth noting that concurrency limits are then applied per-recipient, not per-domain. -- Viktor.