This question already has an answer here:
I need to filter email delivery in Postfix based on a specific header.
Lets have the following example:
There's some PHP script that will dispatch emails to the local MTA (postfix). These emails contain a specific custom header (for example sake, X-EMAIL-TYPE) that will have one of 3 values:
I need to dispatch emails to different SMTP servers based on the X-EMAIL-TYPE header.
Is this possible in Postfix? If yes, how can I do this?