The postfix add-on software "smtpprox" can do exactly what you want, with a little modification. Since smtpprox is written in perl it can adversely affect system load, but it works very well for us and the affect on our system load is negligible.
- Fighting SPAM with a Postfix relay server Antonio Navarro Navarro
- Re: Fighting SPAM with a Postfix relay server Noel Jones
- Re: Fighting SPAM with a Postfix relay server Anthony Wong