* Viktor Dukhovni:

> I strongly do not recommend using LDAP for per-user transport lookups.

Shame that it does not scale, because it works. I have tried using a
combination of LDAP-based virtual_alias_maps and hashed transport_maps
as per your suggestion, but have not yet quite achieve the result I am
looking for.

Let me modify the pseudocode to describe my goal in more detail:

  x = ldap_lookup_recipient_record(envelope_to_address)
  if x.has_attribute(alpha)
      reject_with_code_4xx(message=value_of_attribute(alpha))
  else
      relay_message(nexthop=value_of_attribute(beta))

When I use transport lookups, this is possible, for example by setting
attributes alpha="retry:Unavailable" or beta="smtp:[somehost]".

I tried to emulate this by using virtual alias lookups which return
alpha="pause.domain.tld" or beta="route.domain.tld", combined with a
transports hash map containing

  pause.domain.tld  retry:Unavailable
  route.domain.tld  smtp:[somehost]

Alas, when I do it this way, Postfix accepts email for users with the
alpha attribute and then stores them as deferred in the queue. I need to
reject with "4xx Unavailable" instead.

I feel like I am close but overlooking something.

-Ralph

Reply via email to