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

Bind Postfix to outgoing IP address

Expand Messages
  • Mark Goodge
    How can I bind Postfix to only send outgoing mail via one IP address (ie, always use the same ethernet interface)? I have a server which has two IP addresses,
    Message 1 of 5 , Aug 23, 2011
    • 0 Attachment
      How can I bind Postfix to only send outgoing mail via one IP address
      (ie, always use the same ethernet interface)?

      I have a server which has two IP addresses, one on eth0 and one on
      eth0.1. I have discovered that some of my outgoing mail is being
      rejected by over-zealous spam filters because it comes from the second,
      which doesn't have reverse DNS configured (which is OK; I don't use it
      for anything which needs it).

      However, Postfix seems to pick the "wrong" interface for sending
      outgoing mail, hence the problems above. How can I force it to always
      use the one I want it to use?

      Adding reverse DNS to the second IP is not the solution; I don't have
      control over this and, in any case, all my existing mail DNS is set to
      use the primary IP.

      I've looked at the documentation, and can't see anything obvious.
      inet_interfaces seems only to apply to inbound mail - that is,
      interfaces from which Postfix will accept mail, not those which it uses
      to send it.

      Any clues, anyone?

      Mark
      --
      Sent from my Babbage Difference Engine
      http://mark.goodge.co.uk
      http://www.ratemysupermarket.com
    • Patrick Ben Koetter
      ... smtp_bind_address -- All technical questions asked privately will be automatically answered on the list and archived for public access unless privacy is
      Message 2 of 5 , Aug 23, 2011
      • 0 Attachment
        * Mark Goodge <postfix-users@...>:
        > How can I bind Postfix to only send outgoing mail via one IP address
        > (ie, always use the same ethernet interface)?

        smtp_bind_address


        --
        All technical questions asked privately will be automatically answered on the
        list and archived for public access unless privacy is explicitely required and
        justified.

        saslfinger (debugging SMTP AUTH):
        <http://postfix.state-of-mind.de/patrick.koetter/saslfinger/>
      • Ralf Hildebrandt
        ... postconf |grep bind -- Ralf Hildebrandt Geschäftsbereich IT | Abteilung Netzwerk Charité - Universitätsmedizin Berlin Campus Benjamin Franklin
        Message 3 of 5 , Aug 23, 2011
        • 0 Attachment
          * Mark Goodge <mark@...>:

          > How can I bind Postfix to only send outgoing mail via one IP address
          > (ie, always use the same ethernet interface)?

          postconf |grep bind

          --
          Ralf Hildebrandt
          Geschäftsbereich IT | Abteilung Netzwerk
          Charité - Universitätsmedizin Berlin
          Campus Benjamin Franklin
          Hindenburgdamm 30 | D-12203 Berlin
          Tel. +49 30 450 570 155 | Fax: +49 30 450 570 962
          ralf.hildebrandt@... | http://www.charite.de
        • Mark Goodge
          ... Yes, I discovered that about 5 seconds after I hit send on the previous email. Oh well, and thanks anyway :-) Mark -- Sent from my Babbage Difference
          Message 4 of 5 , Aug 23, 2011
          • 0 Attachment
            On 23/08/2011 14:29, Patrick Ben Koetter wrote:
            > * Mark Goodge<postfix-users@...>:
            >> How can I bind Postfix to only send outgoing mail via one IP address
            >> (ie, always use the same ethernet interface)?
            >
            > smtp_bind_address

            Yes, I discovered that about 5 seconds after I hit "send" on the
            previous email. Oh well, and thanks anyway :-)

            Mark
            --
            Sent from my Babbage Difference Engine
            http://mark.goodge.co.uk
            http://www.ratemysupermarket.com
          • Wietse Venema
            ... Beware, this does not specify the INTERFACE. It only specifies the source IP ADDRESS. That s not the same thing. If the source IP address is not reachable
            Message 5 of 5 , Aug 23, 2011
            • 0 Attachment
              Mark Goodge:
              > On 23/08/2011 14:29, Patrick Ben Koetter wrote:
              > > * Mark Goodge<postfix-users@...>:
              > >> How can I bind Postfix to only send outgoing mail via one IP address
              > >> (ie, always use the same ethernet interface)?
              > >
              > > smtp_bind_address
              >
              > Yes, I discovered that about 5 seconds after I hit "send" on the
              > previous email. Oh well, and thanks anyway :-)

              Beware, this does not specify the INTERFACE. It only
              specifies the source IP ADDRESS. That's not the same thing.

              If the source IP address is not reachable via other network
              interfaces, then connection attempts will fail.

              Wietse
            Your message has been successfully submitted and would be delivered to recipients shortly.