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

domain alias

Expand Messages
  • Alexandre Chapellon
    Hy all! I have a working setup of postfix with virtual domains and domain alias. Until now everything was stored in flat files (hash lookups) and I recently
    Message 1 of 12 , Mar 6, 2007
      Hy all!

      I have a working setup of postfix with virtual domains and domain alias. Until now everything was stored in flat files (hash lookups) and I recently moved to an LDAP backend where I store my virtual domains, mailboxes and local aliases. I would like use LDAP for domains aliases too, meaning that every existing address in a "main" domain (eg: user1@...) should be redirected to the same localpart in the alias domain (eg user1@...).
      With Flat files I acheived this behaviour by using "virtual_alias_domains = hash:/myfile/with/alias_maps"

      and /myfile/with/alias_maps was something like:
      @... @...

      Does anybody knows how to make it work with LDAP (or even mysql would maybe help me)
      Reply With Quote
    • Magnus Bäck
      On Tuesday, March 06, 2007 at 14:03 CET, ... You must not do that. It breaks recipient validation and makes you a backscatter source. ... The answer depends on
      Message 2 of 12 , Mar 6, 2007
        On Tuesday, March 06, 2007 at 14:03 CET,
        Alexandre Chapellon <a.chapellon@...> wrote:

        > I have a working setup of postfix with virtual domains and domain alias.
        > Until now everything was stored in flat files (hash lookups) and I
        > recently moved to an LDAP backend where I store my virtual domains,
        > mailboxes and local aliases. I would like use LDAP for domains aliases
        > too, meaning that every existing address in a "main" domain (eg:
        > user1@... <mailto:user1@...>) should be redirected to the
        > same localpart in the alias domain (eg user1@...
        > <mailto:user1@...>).
        > With Flat files I acheived this behaviour by using
        > "virtual_alias_domains = hash:/myfile/with/alias_maps"
        >
        > and /myfile/with/alias_maps was something like:
        > @... @...

        You must not do that. It breaks recipient validation and makes you a
        backscatter source.

        > Does anybody knows how to make it work with LDAP (or even mysql would
        > maybe help me)

        The answer depends on your schema. The lookup keys Postfix uses and the
        answer it expects are the same no matter what type of lookup table you
        have.

        --
        Magnus Bäck
        magnus@...
      • Alexandre Chapellon
        ... Thank you for this advice. Anyway I have a front SMTP Relay wich uses relay_recipient_maps and so it should do the job... Right? ... Thank I m gonna test
        Message 3 of 12 , Mar 6, 2007
          On Tue, 6 Mar 2007 20:51:24 +0100, Magnus Bäck <magnus@...> wrote:
          > On Tuesday, March 06, 2007 at 14:03 CET,
          > Alexandre Chapellon <a.chapellon@...> wrote:
          >
          >> I have a working setup of postfix with virtual domains and domain alias.
          >
          >> Until now everything was stored in flat files (hash lookups) and I
          >> recently moved to an LDAP backend where I store my virtual domains,
          >> mailboxes and local aliases. I would like use LDAP for domains aliases
          >> too, meaning that every existing address in a "main" domain (eg:
          >> user1@... <mailto:user1@...>) should be redirected to the
          >> same localpart in the alias domain (eg user1@...
          >> <mailto:user1@...>).
          >> With Flat files I acheived this behaviour by using
          >> "virtual_alias_domains = hash:/myfile/with/alias_maps"
          >>
          >> and /myfile/with/alias_maps was something like:
          >> @... @...
          >
          > You must not do that. It breaks recipient validation and makes you a
          > backscatter source.

          Thank you for this advice. Anyway I have a front SMTP Relay wich uses relay_recipient_maps
          and so it should do the job... Right?
          >
          >> Does anybody knows how to make it work with LDAP (or even mysql would
          >> maybe help me)
          >
          > The answer depends on your schema. The lookup keys Postfix uses and the
          > answer it expects are the same no matter what type of lookup table you
          > have.

          Thank I'm gonna test that :)

          >
          > --
          > Magnus Bäck
          > magnus@...
          --
          cordialement,

          Alexandre Chapellon
          Cyberscope / Hosting Platform
        • Christian Veigl
          Hello there. Is there a way to supply the results of a virtual_mailbox_maps-lookup to the pipe(8) command ? My setup includes alises for whole domains. Meaning
          Message 4 of 12 , Oct 2, 2007
            Hello there.

            Is there a way to supply the results of a virtual_mailbox_maps-lookup
            to the pipe(8) command ?

            My setup includes alises for whole domains.

            Meaning i have a 'real' domain domain.real.com and an 'alias' domain
            domain.alias.com. Now mail addressed to $user@... should be
            delivered to $user@....

            Postfix works great with this.

            What does not work so far is the following:

            Delivery is done by maildrop via pipe. So far i did not figure out how to
            get the result from the lookup from virtual_mailbox_maps (which works)
            into maildrop.

            All maildrop can get, is the original recipient address ($user@...
            in the above example).

            And that mail can't be deliverd since there are no mailboxes for that
            (alias) domain.

            I helped myself symlinking around between mailboxes - but i really hope
            there's another way.

            cv.

            --
            Christian Veigl
            cv AT bdf DASH net DOT com
            BDF-net

            BOFH excuse #64:

            CPU needs recalibration
          • Magnus Bäck
            On Tuesday, October 02, 2007 at 10:54 CEST, ... No. ... Make domain.alias.com a virtual alias domain and generate alias mappings for all valid users:
            Message 5 of 12 , Oct 2, 2007
              On Tuesday, October 02, 2007 at 10:54 CEST,
              Christian Veigl <cv@...> wrote:

              > Is there a way to supply the results of a virtual_mailbox_maps-lookup
              > to the pipe(8) command ?

              No.

              > My setup includes alises for whole domains.
              >
              > Meaning i have a 'real' domain domain.real.com and an 'alias' domain
              > domain.alias.com. Now mail addressed to $user@... should be
              > delivered to $user@....

              Make domain.alias.com a virtual alias domain and generate alias mappings
              for all valid users:

              user1@... user1@...
              user2@... user2@...
              ...
              userN@... userN@...

              [...]

              --
              Magnus Bäck
              magnus@...
            • Christian Veigl
              ... I was afraid of that answer ;) Stupid question: why ? Wouldn t that be a really nice feature ? ... Thought about that one, but think it s too much effort -
              Message 6 of 12 , Oct 2, 2007
                On Tue, Oct 02, 2007 at 11:05:18AM +0200, Magnus Bäck wrote:
                > On Tuesday, October 02, 2007 at 10:54 CEST,
                > Christian Veigl <cv@...> wrote:
                >
                > > Is there a way to supply the results of a virtual_mailbox_maps-lookup
                > > to the pipe(8) command ?
                >
                > No.

                I was afraid of that answer ;)

                Stupid question: why ? Wouldn't that be a really nice feature ?

                > > My setup includes alises for whole domains.
                > >
                > > Meaning i have a 'real' domain domain.real.com and an 'alias' domain
                > > domain.alias.com. Now mail addressed to $user@... should be
                > > delivered to $user@....
                >
                > Make domain.alias.com a virtual alias domain and generate alias mappings
                > for all valid users:
                >
                > user1@... user1@...
                > user2@... user2@...
                > ...
                > userN@... userN@...
                >
                > [...]

                Thought about that one, but think it's too much effort - especially
                keeping the mappings up to date.

                I think i'll stick to the symlinking
                ( ln -s domain.real.com domain.alias.com )

                > --
                > Magnus Bäck
                > magnus@...

                --
                Christian Veigl
                cv AT bdf DASH net DOT com
                BDF-net

                BOFH excuse #344:

                Network failure - call NBC
              • Magnus Bäck
                On Tuesday, October 02, 2007 at 16:21 CEST, ... I don t know the exact reason, but code bloat, possible security implications, and
                Message 7 of 12 , Oct 2, 2007
                  On Tuesday, October 02, 2007 at 16:21 CEST,
                  Christian Veigl <cv@...> wrote:

                  > On Tue, Oct 02, 2007 at 11:05:18AM +0200, Magnus Bäck wrote:
                  > > On Tuesday, October 02, 2007 at 10:54 CEST,
                  > > Christian Veigl <cv@...> wrote:
                  > >
                  > > > Is there a way to supply the results of a virtual_mailbox_maps-lookup
                  > > > to the pipe(8) command ?
                  > >
                  > > No.
                  >
                  > I was afraid of that answer ;)
                  >
                  > Stupid question: why ? Wouldn't that be a really nice feature ?

                  I don't know the exact reason, but code bloat, possible security
                  implications, and Rome-was-not-built-in-one-day comes to mind.

                  > > Make domain.alias.com a virtual alias domain and generate alias mappings
                  > > for all valid users:
                  > >
                  > > user1@... user1@...
                  > > user2@... user2@...
                  > > ...
                  > > userN@... userN@...
                  > >
                  > > [...]
                  >
                  > Thought about that one, but think it's too much effort - especially
                  > keeping the mappings up to date.

                  You should of course use the computer to generate the mappings for you.

                  [...]

                  --
                  Magnus Bäck
                  magnus@...
                • Victor Duchovni
                  ... Security. Filenames, uids and gids must be obtained from a trusted source. What is passed between Postfix processes is email addresses, not uids, gids or
                  Message 8 of 12 , Oct 2, 2007
                    On Wed, Oct 03, 2007 at 12:34:46AM +0200, Magnus B?ck wrote:

                    > On Tuesday, October 02, 2007 at 16:21 CEST,
                    > Christian Veigl <cv@...> wrote:
                    >
                    > > On Tue, Oct 02, 2007 at 11:05:18AM +0200, Magnus B?ck wrote:
                    > > > On Tuesday, October 02, 2007 at 10:54 CEST,
                    > > > Christian Veigl <cv@...> wrote:
                    > > >
                    > > > > Is there a way to supply the results of a virtual_mailbox_maps-lookup
                    > > > > to the pipe(8) command ?
                    > > >
                    > > > No.
                    > >
                    > > I was afraid of that answer ;)
                    > >
                    > > Stupid question: why ? Wouldn't that be a really nice feature ?
                    >
                    > I don't know the exact reason, but code bloat, possible security
                    > implications, and Rome-was-not-built-in-one-day comes to mind.

                    Security. Filenames, uids and gids must be obtained from a trusted source.
                    What is passed between Postfix processes is email addresses, not uids,
                    gids or mailbox paths.

                    --
                    Viktor.

                    Disclaimer: off-list followups get on-list replies or get ignored.
                    Please do not ignore the "Reply-To" header.

                    To unsubscribe from the postfix-users list, visit
                    http://www.postfix.org/lists.html or click the link below:
                    <mailto:majordomo@...?body=unsubscribe%20postfix-users>

                    If my response solves your problem, the best way to thank me is to not
                    send an "it worked, thanks" follow-up. If you must respond, please put
                    "It worked, thanks" in the "Subject" so I can delete these quickly.
                  • Christian Veigl
                    ... Yes, of course, Oops, now a Rome-was-not-built-in-one-day comes to my mind :) cv ... -- Christian Veigl cv AT bdf DASH net DOT com BDF-net BOFH excuse
                    Message 9 of 12 , Oct 3, 2007
                      On Wed, Oct 03, 2007 at 12:34:46AM +0200, Magnus Bäck wrote:
                      > On Tuesday, October 02, 2007 at 16:21 CEST,
                      > Christian Veigl <cv@...> wrote:
                      >
                      > > On Tue, Oct 02, 2007 at 11:05:18AM +0200, Magnus Bäck wrote:
                      > > > On Tuesday, October 02, 2007 at 10:54 CEST,
                      > > > Christian Veigl <cv@...> wrote:
                      > > >
                      > > > > Is there a way to supply the results of a virtual_mailbox_maps-lookup
                      > > > > to the pipe(8) command ?
                      > > >
                      > > > No.
                      > >
                      > > I was afraid of that answer ;)
                      > >
                      > > Stupid question: why ? Wouldn't that be a really nice feature ?
                      >
                      > I don't know the exact reason, but code bloat, possible security
                      > implications, and Rome-was-not-built-in-one-day comes to mind.
                      >
                      > > > Make domain.alias.com a virtual alias domain and generate alias mappings
                      > > > for all valid users:
                      > > >
                      > > > user1@... user1@...
                      > > > user2@... user2@...
                      > > > ...
                      > > > userN@... userN@...
                      > > >
                      > > > [...]
                      > >
                      > > Thought about that one, but think it's too much effort - especially
                      > > keeping the mappings up to date.
                      >
                      > You should of course use the computer to generate the mappings for you.

                      Yes, of course, Oops, now a Rome-was-not-built-in-one-day comes to my mind :)

                      cv

                      > [...]
                      >
                      > --
                      > Magnus Bäck
                      > magnus@...

                      --
                      Christian Veigl
                      cv AT bdf DASH net DOT com
                      BDF-net

                      BOFH excuse #196:

                      Me no internet, only janitor, me just wax floors.
                    • Christian Veigl
                      ... I see and i agree. But instead of just passing the original address (in my previous example one like user@domain.alias.com ) passing the address of the
                      Message 10 of 12 , Oct 3, 2007
                        On Tue, Oct 02, 2007 at 06:42:25PM -0400, Victor Duchovni wrote:
                        > On Wed, Oct 03, 2007 at 12:34:46AM +0200, Magnus B?ck wrote:
                        >
                        > > On Tuesday, October 02, 2007 at 16:21 CEST,
                        > > Christian Veigl <cv@...> wrote:
                        > >
                        > > > On Tue, Oct 02, 2007 at 11:05:18AM +0200, Magnus B?ck wrote:
                        > > > > On Tuesday, October 02, 2007 at 10:54 CEST,
                        > > > > Christian Veigl <cv@...> wrote:
                        > > > >
                        > > > > > Is there a way to supply the results of a virtual_mailbox_maps-lookup
                        > > > > > to the pipe(8) command ?
                        > > > >
                        > > > > No.
                        > > >
                        > > > I was afraid of that answer ;)
                        > > >
                        > > > Stupid question: why ? Wouldn't that be a really nice feature ?
                        > >
                        > > I don't know the exact reason, but code bloat, possible security
                        > > implications, and Rome-was-not-built-in-one-day comes to mind.
                        >
                        > Security. Filenames, uids and gids must be obtained from a trusted source.
                        > What is passed between Postfix processes is email addresses, not uids,
                        > gids or mailbox paths.

                        I see and i agree.

                        But instead of just passing the original address (in my previous example
                        one like 'user@...' ) passing the address of the final
                        recipient ( 'user@...' ) would suffice.

                        Probably i could do some address rewriting ... thus passing a rewritten
                        address ... think i'll have look into this.

                        c

                        > --
                        > Viktor.
                        >
                        > Disclaimer: off-list followups get on-list replies or get ignored.
                        > Please do not ignore the "Reply-To" header.
                        >
                        > To unsubscribe from the postfix-users list, visit
                        > http://www.postfix.org/lists.html or click the link below:
                        > <mailto:majordomo@...?body=unsubscribe%20postfix-users>
                        >
                        > If my response solves your problem, the best way to thank me is to not
                        > send an "it worked, thanks" follow-up. If you must respond, please put
                        > "It worked, thanks" in the "Subject" so I can delete these quickly.

                        --
                        Christian Veigl
                        cv AT bdf DASH net DOT com
                        BDF-net

                        BOFH excuse #63:

                        not properly grounded, please bury computer
                      • Victor Duchovni
                        ... What final recipient address? The ${recipient} macro to pipe is always replaced with the final address(es) to which Postfix is doing delivery. If
                        Message 11 of 12 , Oct 3, 2007
                          On Wed, Oct 03, 2007 at 11:15:07AM +0200, Christian Veigl wrote:

                          > > > > > > Is there a way to supply the results of a virtual_mailbox_maps
                          > > > > > > lookup to the pipe(8) command ?
                          > > > > >
                          > > > > > No.
                          > > > >
                          > > > > I was afraid of that answer ;)
                          > > > >
                          > > > > Stupid question: why ? Wouldn't that be a really nice feature ?
                          > >
                          > > Security. Filenames, uids and gids must be obtained from a trusted source.
                          > > What is passed between Postfix processes is email addresses, not uids,
                          > > gids or mailbox paths.
                          >
                          > I see and i agree.
                          >
                          > But instead of just passing the original address (in my previous example
                          > one like 'user@...' ) passing the address of the final
                          > recipient ( 'user@...' ) would suffice.
                          >
                          > Probably i could do some address rewriting ... thus passing a rewritten
                          > address ... think i'll have look into this.

                          What "final" recipient address? The ${recipient} macro to pipe is always
                          replaced with the final address(es) to which Postfix is doing delivery.
                          If virtual(8) is doing the delivery, the final storage location is found
                          in virtual_mailbox_maps, if something else is doing delivery via pipe(8),
                          it is up to that program to put the message in the right place for the
                          given recipient email address.

                          The entries in virtual_mailbox_maps store rcpt->path mappings for
                          virtual(8) delivery, not rcpt->rcpt mappings for obtaining a "final"
                          recipient.

                          If you want rewriting to a new email address prior to delivery, use
                          virtual_alias_maps (virtual(5)).

                          --
                          Viktor.

                          Disclaimer: off-list followups get on-list replies or get ignored.
                          Please do not ignore the "Reply-To" header.

                          To unsubscribe from the postfix-users list, visit
                          http://www.postfix.org/lists.html or click the link below:
                          <mailto:majordomo@...?body=unsubscribe%20postfix-users>

                          If my response solves your problem, the best way to thank me is to not
                          send an "it worked, thanks" follow-up. If you must respond, please put
                          "It worked, thanks" in the "Subject" so I can delete these quickly.
                        • punit jain
                          Hi All, I have a domain with aliases created for all users in that domain. Both primary and alias domains are published. I want that any mail to primary
                          Message 12 of 12 , Apr 1 1:35 AM
                            Hi All,

                            I have a domain  with aliases created for all users in that domain. Both primary and alias domains are published. I want that any mail to primary address  from inside domain should be rejected but should accept mail only to alias address. Also mails coming from other domain should be able to send to primary as well as aliased domain. Any clues ?

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