On Tue, Mar 26, 2024 at 01:52:42PM +0000, Colin McKinnon via Postfix-users 
wrote:

> I want to provision load balancing for my relays.

What kind of "load balancing"?  Why won't MX records do?  For uneven
weights, you can even use SRV records:

    use_srv_lookup = smtp
    relayhost = mx.example.com:smtp

Plus there's also "randmap":

    https://www.postfix.org/DATABASE_README.html

> The catch is that there is already some customized routing in place
> based on recipient domain and large block lists. These are currently
> handled by a transport map.

What sort "customised routing"?

> determine how the mail should be routed. But I need to ensure that I
> don't create any loops - i.e. the routing decision is based on the
> recipient AND where the email came from/via.

That's what sender_dependent_default_transport_maps is for.

> The policy server (https://www.postfix.org/SMTPD_POLICY_README.html)
> seems to be ideal for my requirements since I get both recipient_name
> and helo_name, however the documentation only covers its use in the
> context of 'smtpd_recipient_restrictions'.

It isn't actually a good tool for this, since it cannot affect
fine-grained per-recipient routing in multi-recipient messages.
It can only return FILTER actions which affect all recipients,
and the intent is to support content scanning, not fine-tune
routing.

> 1) Can I use check_policy_service in other contexts than
> smtpd_recipient_restrictions? (I don't want to interfere with
> `smtpd_relay_restrictions = permit_mynetworks
> permit_sasl_authenticated defer_unauth_destination` )

NO.

-- 
    Viktor.
_______________________________________________
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org

Reply via email to