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

"Simplest" approach to full-adress aliases?

Expand Messages
  • Jan Johansson
    Hello! Having mostly used Exim I am trying to sort out a few things with a postfix (2.8.5-2~build0.11.04 on Ubuntu) install. Basically, I want a forwarding
    Message 1 of 10 , Nov 17, 2012
    • 0 Attachment

      Hello!

       

      Having mostly used Exim I am trying to sort out a few things with a postfix (2.8.5-2~build0.11.04  on Ubuntu)  install.

       

      Basically, I want a forwarding mechanism that can map userX@... to anotheruser@...

      So, whats the easiest way to set this up? Manually handling flat files would be sufficient.

    • Ansgar Wiechers
      ... That s what $virtual_alias_maps [1] is for. Add the following line to main.cf: virtual_alias_maps = hash:/etc/postfix/virtual Create a file
      Message 2 of 10 , Nov 17, 2012
      • 0 Attachment
        On 2012-11-17 Jan Johansson wrote:
        > Having mostly used Exim I am trying to sort out a few things with a
        > postfix (2.8.5-2~build0.11.04 on Ubuntu) install.
        >
        > Basically, I want a forwarding mechanism that can map
        > userX@...<mailto:userX@...> to
        > anotheruser@...<mailto:anotheruser@...>
        > So, whats the easiest way to set this up? Manually handling flat files
        > would be sufficient.

        That's what $virtual_alias_maps [1] is for.

        Add the following line to main.cf:

        virtual_alias_maps = hash:/etc/postfix/virtual

        Create a file /etc/postfix/virtual with the mappings you need:

        userX@... anotheruser@...

        Run "postmap /etc/postfix/virtual" to create the hash database.

        For further information see the VIRTUAL_README [2].

        [1] http://www.postfix.org/postconf.5.html#virtual_alias_maps
        [2] http://www.postfix.org/VIRTUAL_README.html

        Regards
        Ansgar Wiechers
        --
        "All vulnerabilities deserve a public fear period prior to patches
        becoming available."
        --Jason Coombs on Bugtraq
      • Jeroen Geilman
        ... NOTE that domainALPHA.com must be in an address class you control: relay, local, or virtual_*. The presence of the alias alone does not mean mail for the
        Message 3 of 10 , Nov 17, 2012
        • 0 Attachment
          On 11/17/2012 02:22 PM, Ansgar Wiechers wrote:
          > On 2012-11-17 Jan Johansson wrote:
          >> Having mostly used Exim I am trying to sort out a few things with a
          >> postfix (2.8.5-2~build0.11.04 on Ubuntu) install.
          >>
          >> Basically, I want a forwarding mechanism that can map
          >> userX@...<mailto:userX@...> to
          >> anotheruser@...<mailto:anotheruser@...>
          >> So, whats the easiest way to set this up? Manually handling flat files
          >> would be sufficient.
          > That's what $virtual_alias_maps [1] is for.
          >
          > Add the following line to main.cf:
          >
          > virtual_alias_maps = hash:/etc/postfix/virtual
          >
          > Create a file /etc/postfix/virtual with the mappings you need:
          >
          > userX@... anotheruser@...
          >
          > Run "postmap /etc/postfix/virtual" to create the hash database.

          NOTE that domainALPHA.com must be in an address class you control:
          relay, local, or virtual_*.

          The presence of the alias alone does not mean mail for the domain is
          accepted.

          >
          > For further information see the VIRTUAL_README [2].
          >
          > [1] http://www.postfix.org/postconf.5.html#virtual_alias_maps
          > [2] http://www.postfix.org/VIRTUAL_README.html
          >
          > Regards
          > Ansgar Wiechers


          --
          J.
        • /dev/rob0
          ... I think you read too much into the question. The OP appeared to asking about basic virtual_alias_maps use; nothing was said about how/whether to accept the
          Message 4 of 10 , Nov 17, 2012
          • 0 Attachment
            On Sat, Nov 17, 2012 at 03:24:33PM +0100, Jeroen Geilman wrote:
            > On 11/17/2012 02:22 PM, Ansgar Wiechers wrote:
            > >On 2012-11-17 Jan Johansson wrote:
            > >>Having mostly used Exim I am trying to sort out a few things with
            > >>a postfix (2.8.5-2~build0.11.04 on Ubuntu) install.
            > >>
            > >>Basically, I want a forwarding mechanism that can map
            > >>userX@...<mailto:userX@...> to
            > >>anotheruser@...<mailto:anotheruser@...>
            > >>So, whats the easiest way to set this up? Manually handling flat
            > >>files would be sufficient.

            > >That's what $virtual_alias_maps [1] is for.
            > >
            > >Add the following line to main.cf:
            > >
            > >virtual_alias_maps = hash:/etc/postfix/virtual
            > >
            > >Create a file /etc/postfix/virtual with the mappings you need:
            > >
            > >userX@... anotheruser@...
            > >
            > >Run "postmap /etc/postfix/virtual" to create the hash database.
            >
            > NOTE that domainALPHA.com must be in an address class you control:
            > relay, local, or virtual_*.
            >
            > The presence of the alias alone does not mean mail for the domain
            > is accepted.

            I think you read too much into the question. The OP appeared to
            asking about basic virtual_alias_maps use; nothing was said about
            how/whether to accept the mail. Maybe it's already being accepted
            under permit_mynetworks, or via sendmail(1)?

            > >For further information see the VIRTUAL_README [2].
            > >
            > >[1] http://www.postfix.org/postconf.5.html#virtual_alias_maps
            > >[2] http://www.postfix.org/VIRTUAL_README.html
            --
            http://rob0.nodns4.us/ -- system administration and consulting
            Offlist GMX mail is seen only if "/dev/rob0" is in the Subject:
          • Jan Johansson
            ... That seem simple enough... Looks like I was over complicating the issue. Thanks!
            Message 5 of 10 , Nov 18, 2012
            • 0 Attachment
              >That's what $virtual_alias_maps [1] is for.
              >
              >Add the following line to main.cf:
              >
              >virtual_alias_maps = hash:/etc/postfix/virtual
              >
              >Create a file /etc/postfix/virtual with the mappings you need:

              That seem simple enough... Looks like I was over complicating the issue. Thanks!
            • Jan Johansson
              ... That I gathered. The box is a MX for the domains in question.
              Message 6 of 10 , Nov 18, 2012
              • 0 Attachment
                >NOTE that domainALPHA.com must be in an address class you control:
                >relay, local, or virtual_*.
                >
                >The presence of the alias alone does not mean mail for the domain is accepted.

                That I gathered. The box is a MX for the domains in question.
              • Jan Johansson
                ... Basically the box is set up to relay to other boxes. Everything is handled via relay_domains, relay_recipient_maps and trasnsport_maps.
                Message 7 of 10 , Nov 18, 2012
                • 0 Attachment
                  >I think you read too much into the question. The OP appeared to asking about basic virtual_alias_maps use; nothing was said about how/whether to accept the mail. Maybe it's already being accepted under >permit_mynetworks, or via sendmail(1)?

                  Basically the box is set up to relay to other boxes. Everything is handled via relay_domains, relay_recipient_maps and trasnsport_maps.
                • Jeroen Geilman
                  ... That has nothing to do with how postfix percieves the domain. -- J.
                  Message 8 of 10 , Nov 18, 2012
                  • 0 Attachment
                    On 11/18/2012 08:26 PM, Jan Johansson wrote:
                    >> NOTE that domainALPHA.com must be in an address class you control:
                    >> relay, local, or virtual_*.
                    >>
                    >> The presence of the alias alone does not mean mail for the domain is accepted.
                    > That I gathered. The box is a MX for the domains in question.
                    >
                    >

                    That has nothing to do with how postfix percieves the domain.


                    --
                    J.
                  • Jan Johansson
                    ... Understood. As i stated in another reply, the box perceives them all as relay_domains.
                    Message 9 of 10 , Nov 18, 2012
                    • 0 Attachment
                      >That has nothing to do with how postfix percieves the domain.

                      Understood. As i stated in another reply, the box perceives them all as relay_domains.
                    • mouss
                      ... No. virtual_alias_maps apply to all mail that goes through your postfix, whatever the domain class is. ... and mail may be accepted even if the domain is
                      Message 10 of 10 , Nov 19, 2012
                      • 0 Attachment
                        Le 17/11/2012 15:24, Jeroen Geilman a écrit :
                        >[snip]
                        >
                        > NOTE that domainALPHA.com must be in an address class you control:
                        > relay, local, or virtual_*.
                        >

                        No. virtual_alias_maps apply to all mail that goes through your postfix,
                        whatever the domain class is.

                        > The presence of the alias alone does not mean mail for the domain is
                        > accepted.
                        >

                        and mail may be accepted even if the domain is not in "an address class
                        you control...". the obvious example is submitted mail. a less obvious
                        one is a domain not declared in relayd_omains, but accepted via a
                        check_recipient_address (yeah, that's ugly, but still possible).

                        in short, the three things:

                        - mail rewrite
                        - mail address classes
                        - mail acceptance

                        are 3 different concepts.
                      Your message has been successfully submitted and would be delivered to recipients shortly.