I wrote a program that has a configuration module. The program is not too long and its not perfect, but it shows a little bit of style (a very little bit) and makes use of a config module (
Config::ApacheFormat). It might be of some use to you. The program is available here:
Exchange to Postfix Firewall Configuration.
Eric