I'd like to setup a postfix host (using RHEL 5.4's default postfix, which is version 2.3) with the following characteristics:
- an SMTP listener listens on 10.0.0.1:25 and relays all e-mails to 10.0.0.1:2525
- an SMTP listener listens on 10.0.0.1:2525 and relays all e-mails to 10.0.0.2:25
Basically the challenge here is to use two different relayhosts for the different SMTP listeners.
Is it possible? Is there a better solution to achieve similar behavior?
Define the listeners in master.cf with the relay host as a content filter:
10.1.0.1:25 inet n - - - - smtpd -o content_filter=smtp:[10.0.0.1]:2525
10.1.0.1:2525 inet n - - - - smtpd -o content_filter=smtp:[10.0.0.2]:25
I had fun figuring this out!