Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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

We have a Postfix SMTP server that's bound to two IP addresses and serves mail for two different domains. We can't change the domains to both use the same, single IP. Both IP addresses have reverse DNS

  • reverses to
  • reverses to

In our Postfix config I have

myhostname =
myhostname =

inet_interfaces =,

smtpd_banner = $myhostname Mail Server

(And some other stuff, which I think is irrelevant)

Using MXToolbox, running the smtp test command on returns everything as OK, however running it on returns an error because Postfix is identifying itself as '' in the SMTP banner, how do I get it to return the correct banner based on the external IP address used?

share|improve this question
up vote 13 down vote accepted

You need to edit

replace the line starting with "smtp" with:  inet  n  - - - -  smtpd -o  inet  n  - - - -  smtpd -o

If you set one variable multiple times only one of them will remain.

share|improve this answer

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.