Some confusion here, probably because I have used the wrong
terminology.  When I said I have a content filter that needs to
influence how a message is routed, I meant a content filter that is
implemented as an SMTP proxy sitting between two Postfix instances.

That said, Wietse's response led me to a solution I think:

The SMTP proxy can add an X-header indicating where the message should
be routed.
In the upstream Postfix instance I can configure header_checks to
check for the X-header and return a FILTER response based on the
header value using a regex.
I'll need to take steps to ensure this can't be exploited, e.g. by
stripping the X-header if it exists in the downstream Postfix
instance, or in the SMTP proxy.

Would that work?

TIA,
Rob






On 2 June 2016 at 18:29, Wietse Venema <wie...@porcupine.org> wrote:
> Viktor Dukhovni:
>>
>> > On Jun 2, 2016, at 12:04 PM, Rob Maidment <rmaidm...@gmail.com> wrote:
>> >
>> > 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?
>>
>> That's what content filters do.  They preempt the routing of messages
>> by recipient domain, and route all the recipients to the selected
>> transport:nexthop.
>>
>>       FILTER smtp-or-clone:[nexthop-host.example.net]
>>       FILTER smtp-or-clone:nexthop-domain.example
>
> As currently implemented, FILTER is a message property, not a
> recipient property.  That means, there is no per-recipient FILTER.
>
>         Wietse

Reply via email to