I have a quick question about accessing a MySQL database via Postfix and adding a custom header to an email based on the result. So we have setup an Ubuntu server with Postfix which is using a MySQL DB for virtual addresses, now my question is this: Is it possible to lookup an address in the virtual addresses table and if it matches the search criteria, add a custom Header to the email? We would also need this to happen when the email arrives in case there are any forwarders attached to the email account.
I have found resources on how to add custom headers via Postfix: http://saaboke.com/?p=22, but I do not know how to incorporate that with MySQL. Any suggestions would be greatly appreciated.
Thanks for your time.