Postix and 2nd IP problem (on one of my servrs)

Discussion in 'Server Operation' started by edge, Jun 28, 2007.

  1. edge

    edge HowtoForge Supporter

    Okay.. I've been at this some time now, and I'm about to give up!..

    I'm trying to get postfix to use my 2nd IP when sending email!
    I've got it working fine on server-1, but on my server-2 I can not get it to work for some reason! (it keeps using the main IP)

    I've been comparing some files, and they are all setup the same (exept IP's and domain names)

    Both postfix main.cf files are setup the same.
    postconf -n and postconf are setup the same.
    Filrewals on both system are setup the same.
    DNS records on both systems are setup the same.
    hostname -f and hostname showup the same.
    Both server have the same /etc/hosts setup.

    I've restarted postfix about a 100 times..

    When I did the setup for server-1 I think that I had to do some "trick" to get it to work. (it's a long time ago)

    Sending email from server-1 shows my 2nd IP (what I want).
    Sending email from server-2 shows my 1st IP (NOT what I want. I want it to show my 2nd IP of server-2).

    Anyone here who might have a clue for me?
     
  2. edge

    edge HowtoForge Supporter

    Okay,

    After adding "smtp_bind_address=21.21.21.21" to the postfix main.cf (and restarting postfix) I got it to work for my server-2

    The strange thing is that I do not have this in the working server-1 setup!
     
  3. falko

    falko Super Moderator

    That's the correct setting. Don't know why server1 does it without it... :confused:
     

Share This Page