Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 and relays all e-mails to
  • an SMTP listener listens on and relays all e-mails to

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?

share|improve this question
up vote 0 down vote accepted

Define the listeners in with the relay host as a content filter: inet n - - - - smtpd -o content_filter=smtp:[]:2525 inet n - - - - smtpd -o content_filter=smtp:[]:25

I had fun figuring this out!

share|improve this answer
Well, I'm not entirely happy with this solution but that's what I figured out myself as well. Thanks. – Zizzencs Mar 5 '10 at 12:51
What's your objection to it? – quadruplebucky Mar 7 '10 at 21:35
It's not a content filter that I send the mails to... :-) – Zizzencs Mar 9 '10 at 10:00
...sure it's a content filter that does nothing but connect to a particular IP/port – quadruplebucky Mar 9 '10 at 11:48

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.