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

how to masquerade / map the from: field without masquerading the rcpt to:

Expand Messages
  • Etienne Simard
    Hi, I m doing some tests to hopefully use postfix instead of the other MTA but I tried different ways of masquerading the domain name with another one and I am
    Message 1 of 4 , Mar 22 2:17 PM
    • 0 Attachment
      Hi,

      I'm doing some tests to hopefully use postfix instead of the other MTA
      but I tried different ways of masquerading the domain name with
      another one and I am not successful.
      The closest I got was using

      mydomain = example.net
      masquerade_domains = example.org, example.net
      smtp_generic_maps = hash:/etc/postfix/generic

      @... @...

      This works in theory, but then the RCPT TO: going to test@...
      also get rewritten to test@... which is not good.

      and with
      sender_canonical_maps = hash:/etc/postfix/sender_canonical

      @... @...

      I only get the reply-to email from the recipient to be changed to
      test@...

      Any hint would be appreciated. I couldn't find the exact same example
      on the internet which is masquerading two domain domain names under
      one, but only for the
      sender's email address and not the recipient email address.

      --
      esimard
    • Wietse Venema
      ... masquerade_domains is a hack for poorly-organized sites. It is better if systems send mail with an valid email address. If that is not possible, consider
      Message 2 of 4 , Mar 22 2:40 PM
      • 0 Attachment
        Etienne Simard:
        > Hi,
        >
        > I'm doing some tests to hopefully use postfix instead of the other MTA
        > but I tried different ways of masquerading the domain name with
        > another one and I am not successful.
        > The closest I got was using
        >
        > mydomain = example.net
        > masquerade_domains = example.org, example.net

        masquerade_domains is a hack for poorly-organized sites. It is
        better if systems send mail with an valid email address.

        If that is not possible, consider using smtp_generic_maps on the
        boundary between the chaos and the external network. Use the same
        rewriting strategy as described, for a different problem, in
        http://www.postfix.org/STANDARD_CONFIGURATION_README.html#fantasy

        masquerade_domains breaks all kinds of things in Postfix, and it
        should probably be phased out, now that smtp_generic_maps exists.

        Wietse
      • Etienne Simard
        Thanks for the quick response. The problem i have with the smtp_generic_maps is that when I put @exemple.org @exemple.net in the map it works, but it also
        Message 3 of 4 , Mar 22 3:18 PM
        • 0 Attachment
          Thanks for the quick response.

          The problem i have with the smtp_generic_maps is that when I put
          "@... @..."
          in the map it works, but it also changes the RCPT TO addresses.

          So if I send from esimard@... to wietse@... it will
          now try to send emails to wietse@... which does not exist.

          Is there a way around that?

          Regards,

          On Fri, Mar 22, 2013 at 5:40 PM, Wietse Venema <wietse@...> wrote:
          > Etienne Simard:
          >> Hi,
          >>
          >> I'm doing some tests to hopefully use postfix instead of the other MTA
          >> but I tried different ways of masquerading the domain name with
          >> another one and I am not successful.
          >> The closest I got was using
          >>
          >> mydomain = example.net
          >> masquerade_domains = example.org, example.net
          >
          > masquerade_domains is a hack for poorly-organized sites. It is
          > better if systems send mail with an valid email address.
          >
          > If that is not possible, consider using smtp_generic_maps on the
          > boundary between the chaos and the external network. Use the same
          > rewriting strategy as described, for a different problem, in
          > http://www.postfix.org/STANDARD_CONFIGURATION_README.html#fantasy
          >
          > masquerade_domains breaks all kinds of things in Postfix, and it
          > should probably be phased out, now that smtp_generic_maps exists.
          >
          > Wietse



          --
          Etienne Simard
          Network and systems administrator | Acquisio

          Tel: 450.465.2631 ext. 265
          Cell: 514-836-9183
          Email: esimard@...

          Follow Us:
          Twitter: http://twitter.com/acquisio
          LinkedIn: http://www.linkedin.com/company/acquisio
          Facebook: http://www.facebook.com/acquisio


          6300 Auteuil, suite 300 | Brossard, Qu├ębec J4Z 3P2
          Toll Free: 1.866.493.9070 | www.acquisio.com
        • Wietse Venema
          ... Use the right tool for the right job. Use smtp_generic_maps on the network boundary, to transform addresses that are valid only inside the network, into
          Message 4 of 4 , Mar 22 4:06 PM
          • 0 Attachment
            Etienne Simard:
            > Thanks for the quick response.
            >
            > The problem i have with the smtp_generic_maps is that when I put
            > "@... @..."
            > in the map it works, but it also changes the RCPT TO addresses.

            Use the right tool for the right job.

            Use smtp_generic_maps on the network boundary, to transform addresses
            that are valid only inside the network, into addresses that are
            valid outside the network, without exceptions.

            Use aliases on the network boundary MTA, to route mail that enters
            the network from outside, to whatever addresses you use internally.

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