I have a content filter that needs to ensure certain messages are relayed to a specific nexthop MTA, based on the message content. How can the content filter influence how the message is routed?
I guess I could run an instance of smtp for each custom nexthop and configure each instance to relay all mail to that nexthop, and then have the content filter select the appropriate smtp instance, but the number of custom nexthops might be large (100?) so that is probably not practical. I can make the content filter add an X-header that defines the nexthop but how can I then make use of it? There is always source routing I suppose (e.g. @nexthop:u...@domain.com) but that feels like asking for trouble. Does Postfix even take notice of source routing? If it does, can it remove the nexthop before delivery? I've looked at the responses a policy server can return (i.e. access policy delegation) - they include a REDIRECT action but not a "RELAYTO" action. TIA, Rob