I need to forward all Postfix mail to a script. I have done this with a transport map. But, for every message Postfix needs to reload that script, and this is a performance nightmare.
I want to write a daemon and configure Postfix to use SMTP or UUCP to forward mail, but I can't find any examples suggesting how I might write such a daemon. Any hints or pointers? (My preferred languages are Ruby or Python.)