As the result of repeated requests to make Postfix routing dependent on envelope or content properties, Postfix now has several mail delivery features that are not fully orthogonal.
First there are sender_dependent_xxx_maps where xxx is relayhost, default_transport, and so on. These are "nice" in the sense that they don't have an effect on mail that should be delivered locally. Second there is "FILTER transport:". In practice this feature is suitable only for transit mail. By design the FILTER command overrides all routing decisions (that is needed for real content filters to work). However, when filter "FILTER transport:" specifies an an SMTP client, mail for local recipients will fail with a "mail loops back to myself" error. This is not obvious from the documentation and should be added. So, this is something to be kept in mind when proposing solutions. Wietse