I know how to use header_check... but it works only on upcoming emails. I have to analyze the header again after the email is deferred and send it through different transport. The transport should be a script that analyze the content of the email and updates database with some information.
Any idea what I can use in postfix to create such a behavioral.