Re: source & destination based routing: When to decide where to go you need to go
- Sandy Drobic wrote:
> Fabio Pietrosanti wrote:It would be too complicated to implement this. he would need a first
>> mouss wrote:
>>> FILTER applies to a message, not to a recipient, and is overriden by
>>> FILTER statements in subsequent checks. OP needs a content filter or
>>> an MDA.
>> You mean that policy server cannot return to postfix the "FILTER"
>> statement in order to modify the routing behaviour?
> No, mouss correctly stated that the filter decision will be decided
> for the message. In case of multi-recipient messages the mail for all
> of these recipients will then be routed according to the filter
> That means if you want to filter with the filter action you should
> make sure to define a transport that takes care to separate
> multi-recipient messages into several single-recipient messages.
smtpd to do the transport decision, and another one to do the FILTER
decision (in a single "step", FILTER is performed before transprt so you
can't mix their effects).
a content_filter is better.
Note: He can use maildrop/procmail as a content_filter...
>smtp:[ip]:port is better.
>> Postfix ask what to do to the policy server by passing:
>> Policy server check in my database with a sql statement like 'select
>> outgoing_gateway from routing_tables where recipient=x@... and
>> sender=y@...' .
>> Policy server return as action FILTER smtp:host:port
>> Does this could work?
> Yes, that should work, provided you only have single-recipient
> messages at that stage.