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

Re: Use a different smtp_bind_address for fallback

Expand Messages
  • Wietse Venema
    ... There are a bazillion things that you can t specify with fallback_relay or other Postfix parameters. I document only the things that are promised to work.
    Message 1 of 7 , Jul 9, 2013
      Ram:
      > On 07/09/2013 04:24 PM, Wietse Venema wrote:
      > > Ram:
      > >> Today I use in master.cf
      > >>
      > >> smtp unix - - n - - smtp
      > >> -o smtp_bind_address=X.X.X.X
      > >> -o fallback_relay=newhost
      > >>
      > >>
      > >> But I have a requirement that the fallback mails should be sent via a
      > >> different smtp_bind_address
      > >> How can I specify this in smtp fallback
      > > You configure this in the "newhost" MTA.
      > I want the fallback mail to go via a new bind address
      >
      > I can not specify
      > -o fallback_relay=smtpnew:[newhost]

      There are a bazillion things that you can't specify with fallback_relay
      or other Postfix parameters. I document only the things that are
      promised to work.

      Postfix does not support multiple smtp_bind_address settings. if
      you really need that then you can use some network address/port
      translation rule in the IP stack.

      Wietse
    • Ram
      ... I guess I understand that. But I think the requirement would be reasonable If I have 2 networks I may need to have different bind addresses On the
      Message 2 of 7 , Jul 9, 2013
        On 07/09/2013 05:33 PM, Wietse Venema wrote:
        > Ram:
        >> On 07/09/2013 04:24 PM, Wietse Venema wrote:
        >>> Ram:
        >>>> Today I use in master.cf
        >>>>
        >>>> smtp unix - - n - - smtp
        >>>> -o smtp_bind_address=X.X.X.X
        >>>> -o fallback_relay=newhost
        >>>>
        >>>>
        >>>> But I have a requirement that the fallback mails should be sent via a
        >>>> different smtp_bind_address
        >>>> How can I specify this in smtp fallback
        >>> You configure this in the "newhost" MTA.
        >> I want the fallback mail to go via a new bind address
        >>
        >> I can not specify
        >> -o fallback_relay=smtpnew:[newhost]
        > There are a bazillion things that you can't specify with fallback_relay
        > or other Postfix parameters. I document only the things that are
        > promised to work.
        I guess I understand that. But I think the requirement would be
        reasonable If I have 2 networks I may need to have different bind addresses
        On the fallback_relay , can I specify any command line parameter ?









        > Postfix does not support multiple smtp_bind_address settings. if
        > you really need that then you can use some network address/port
        > translation rule in the IP stack.
        >
        > Wietse
      • Wietse Venema
        ... All supported behavior is documented including command line.
        Message 3 of 7 , Jul 10, 2013
          Ram:
          >
          > On 07/09/2013 05:33 PM, Wietse Venema wrote:
          > > Ram:
          > >> On 07/09/2013 04:24 PM, Wietse Venema wrote:
          > >>> Ram:
          > >>>> Today I use in master.cf
          > >>>>
          > >>>> smtp unix - - n - - smtp
          > >>>> -o smtp_bind_address=X.X.X.X
          > >>>> -o fallback_relay=newhost
          > >>>>
          > >>>> But I have a requirement that the fallback mails should be sent via a
          > >>>> different smtp_bind_address
          > >>>> How can I specify this in smtp fallback
          > >>> You configure this in the "newhost" MTA.
          > >> I want the fallback mail to go via a new bind address
          > >>
          > >> I can not specify
          > >> -o fallback_relay=smtpnew:[newhost]

          > > There are a bazillion things that you can't specify with fallback_relay
          > > or other Postfix parameters. I document only the things that are
          > > promised to work.

          > I guess I understand that. But I think the requirement would be
          > reasonable If I have 2 networks I may need to have different bind addresses
          > On the fallback_relay , can I specify any command line parameter ?

          All supported behavior is documented including command line.

          > > Postfix does not support multiple smtp_bind_address settings. if
          > > you really need that then you can use some network address/port
          > > translation rule in the IP stack.
          > >
          > > Wietse
          >
        • Viktor Dukhovni
          ... The code that implements smtp_bind_address is in smtp_connect_addr() in src/smtp/smtp_connect.c. The sensible implementation of what you describe is a
          Message 4 of 7 , Jul 10, 2013
            On Wed, Jul 10, 2013 at 10:32:19AM +0530, Ram wrote:

            > I guess I understand that. But I think the requirement would be
            > reasonable If I have 2 networks I may need to have different bind
            > addresses.

            The code that implements smtp_bind_address is in smtp_connect_addr()
            in src/smtp/smtp_connect.c. The sensible implementation of what
            you describe is a table lookup by nexthop destination that yields
            the appropriate bind address. You'd need open the table in pre-jail
            initialization in src/smtp/smtp.c.

            main.cf:
            indexed = ${default_database_type}:${config_directory}/
            smtp_bind_address_maps = ${indexed}bind_addr

            bind_addr:
            ipv4:[smtp.example.net]:587 192.0.2.1
            ipv6:[smtp.example.com]:587 2001:db8::1

            The lookup key would be <protocol>:<nexthop>. Demand for this would
            be relatively narrow. I am not sure this warrants a new feature in
            the official Postfix release.

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