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

I currently have multiple network interfaces on my server. When I try to send mail, through telnet, the IP which i connect to, isn't showing up as the source ip, but the ip of eth0 is showing. I have set up multiple IP's like this: eth0:0, eht0:1 etc. When i changed the smtp_bind_address i actually got the ip which i connected through as the source ip of the email, but when i added multiple entries to this setting it couldn't send. Also when changing inet_interfaces it only works with one ip.

Anyone who can help me make it set the source IP to the one i connect to, when sending emails?

share|improve this question
I assume you don't want to bind it to all interfaces? Can we get the output of /sbin/ip address, /sbin/ip route & /usr/bin/postconf please. – Martin May 12 '11 at 7:52

If you are sending mails to Postfix (via one IP) it gets queued in the spooler. Then the destination is calculated and Postfix sends out the mail via the IP configured by smtp_bind_address. At this point Postfix doesn't know on which IP it was received and makes no attempts to use that (unknown) IP for outgoing mails.

When you really need a setup where the incoming IP is the outgoing IP, then you need a "multi-instance" setup of Postfix. Each instance then has to be configured for each single IP. See

If it does not depend on the incoming IP, but the outgoing domain(s), then you can use transport maps and separate "smtp" processes in

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.