Loading ...
Sorry, an error occurred while loading the content.

Re: postfix interface

Expand Messages
  • Barney Desmond
    ... You need to make sure you understand the difference between binding to the source-IP and getting the packets routed out. With smtp_bind_address, packets
    Message 1 of 4 , Jul 31, 2008
    • 0 Attachment
      2008/8/1 Gabriel Angel Möll Ibacache <gabriel.moll@...>:
      > Well, I tryed to define smtp_bind_address=y.y.y.y but that didn't
      > work, maybe because I had the same default router for both IP (x.x.x.x
      > and y.y.y.y). Or maybe the nat rule in iptables is causing the
      > redirection to x.x.x.x.

      You need to make sure you understand the difference between binding to
      the source-IP and getting the packets routed out. With
      smtp_bind_address, packets will be created with that source address.
      Past this point, it's up to the networking stack to figure out which
      physical interface it leaves by.

      SNAT is a post-routing rule. This means it does something only once
      all the routing is done, the outgoing interface has already been
      decided.

      Linux only does destination-based routing (by default). To make the
      packets leave via eth2, make sure that eth2 is the default gateway.
      You can check this with something like:

      yoshino:~# ip route get to 1.2.3.4
      1.2.3.4 via 202.4.232.254 dev eth1 src 202.4.232.67
      cache mtu 1500 advmss 1460 hoplimit 64

      If you don't see the correct device there, you probably need to fix the routing.


      -Barney Desmond
    Your message has been successfully submitted and would be delivered to recipients shortly.