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

Multiple IP addresses binding

Expand Messages
  • WebprodsPT
    Hello, I am the administrator of a Postfix setup with multiple domains, multiple IP addresses and SSL configured and up and running. Everything was configured
    Message 1 of 3 , Nov 29, 2012
    • 0 Attachment
      Hello,

      I am the administrator of a Postfix setup with multiple domains,
      multiple IP addresses and SSL configured and up and running. Everything
      was configured by myself and I have no restrictions on the mail server
      machine so basically I can do whatever you suggest.

      Today I received a new requirement and I'm not being able to configure
      it, even after reading lots of resources around the web. Email messages
      for each separate domain must be sent FROM their respective IP address.

      The essential part of master.cf looks like this:

      domain1.com:smtp inet n - - - - smtpd
      -o myhostname=domain1.com
      -o smtpd_tls_cert_file=/home/root/certs/wp/webp.crt
      -o smtpd_tls_key_file=/home/root/certs/wp/webp.key
      -o smtp_bind_address=1.1.1.1
      domain2.com:smtp inet n - - - - smtpd
      -o myhostname=domain2.com
      -o smtpd_tls_cert_file=/home/root/certs/fr/fr.crt
      -o smtpd_tls_key_file=/home/root/certs/fr/fr.key
      -o smtp_bind_address=2.2.2.2

      domain1.com:smtps inet n - - - - smtpd
      -o myhostname=domain1.com
      -o smtpd_tls_wrappermode=yes
      -o smtpd_tls_cert_file=/home/root/certs/wp/webp.crt
      -o smtpd_tls_key_file=/home/root/certs/wp/webp.key
      -o smtp_bind_address=1.1.1.1
      domain2.com:smtps inet n - - - - smtpd
      -o myhostname=domain2.com
      -o smtpd_tls_wrappermode=yes
      -o smtpd_tls_cert_file=/home/root/certs/fr/fr.crt
      -o smtpd_tls_key_file=/home/root/certs/fr/fr.key
      -o smtp_bind_address=2.2.2.2


      No matter what I do the messages are always sent with IP address 1.1.1.1

      I thought smtp_bind_address should define the IP address used to send
      messages but it's completely ignored.

      I need help with this one if you can.

      Thanks
    • Wietse Venema
      ... As documented, using -o smtp_bind_address with smtpd(8), the mail receiving program, has no effect whatsoever. This feature has effect only on smtp(8),
      Message 2 of 3 , Nov 29, 2012
      • 0 Attachment
        WebprodsPT:
        > Hello,
        >
        > I am the administrator of a Postfix setup with multiple domains,
        > multiple IP addresses and SSL configured and up and running. Everything
        > was configured by myself and I have no restrictions on the mail server
        > machine so basically I can do whatever you suggest.
        >
        > Today I received a new requirement and I'm not being able to configure
        > it, even after reading lots of resources around the web. Email messages
        > for each separate domain must be sent FROM their respective IP address.

        As documented, using "-o smtp_bind_address" with smtpd(8), the mail
        receiving program, has no effect whatsoever. This feature has effect
        only on smtp(8), the mail sending program.

        You may kludge something with sender_dependent_default_transport_maps,
        choosing an appropriate SMTP client depending on the sender address,
        each SMTP client having its own "-o smtp_bind_address" setting.
        That obviously does not work for delivery status notifications
        which, as required by RFC, have the null sender address.

        The proper solution is to use one POSTFIX INSTANCE per domain/IP
        address. See http://www.postfix.org/MULTI_INSTANCE_README.html

        Wietse
      • WebprodsPT
        ... Thank you. This information was very useful. Now I understand the differences between smtp and smtpd processes and why some of the -o parameters where not
        Message 3 of 3 , Dec 1, 2012
        • 0 Attachment
          On 11/30/2012 01:28 AM, Wietse Venema wrote:
          > WebprodsPT:
          >> Hello,
          >>
          >> I am the administrator of a Postfix setup with multiple domains,
          >> multiple IP addresses and SSL configured and up and running. Everything
          >> was configured by myself and I have no restrictions on the mail server
          >> machine so basically I can do whatever you suggest.
          >>
          >> Today I received a new requirement and I'm not being able to configure
          >> it, even after reading lots of resources around the web. Email messages
          >> for each separate domain must be sent FROM their respective IP address.
          >
          > As documented, using "-o smtp_bind_address" with smtpd(8), the mail
          > receiving program, has no effect whatsoever. This feature has effect
          > only on smtp(8), the mail sending program.
          >
          > You may kludge something with sender_dependent_default_transport_maps,
          > choosing an appropriate SMTP client depending on the sender address,
          > each SMTP client having its own "-o smtp_bind_address" setting.
          > That obviously does not work for delivery status notifications
          > which, as required by RFC, have the null sender address.
          >
          > The proper solution is to use one POSTFIX INSTANCE per domain/IP
          > address. See http://www.postfix.org/MULTI_INSTANCE_README.html
          >
          > Wietse
          >

          Thank you. This information was very useful.
          Now I understand the differences between smtp and smtpd processes and
          why some of the -o parameters where not being used in some circumstances
          (like -o myhostname that is used in smtp aka sending process and must be
          set in each main.conf instance obviously).

          I'm having trouble now with dovecot in multiple instances but I will
          create other thread for hat.

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