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

Aliases Lookups, not found? Then Smarthost

Expand Messages
  • wiskbroom@hotmail.com
    Hello All; I currently have the following setup in my main.cf: alias_maps = dbm:/etc/postfix/aliases, nis:mail.aliases I ve also enabled myself to receive
    Message 1 of 6 , Jul 29, 2008
      Hello All;

      I currently have the following setup in my main.cf:

      alias_maps = dbm:/etc/postfix/aliases, nis:mail.aliases

      I've also enabled myself to receive email for about 15 domains.

      Everything works just fine, but because of some new domains I am now charged with maintaining, I am now faced with how I am going to synchronize these new domains users into my aliases, preferably in a way that would require very little effort on my part.

      What I am looking for is a way to forward all email for say domain XXX.COM to host server-1, if a users account is not found locally in either my aliases dbm or my NIS maps, ditto for domain ZZZ.com to smtp host server-2. Some of the users for XXX.COM might be residing at my domain/environment, therefore I need to first lookup locally before forwarding. Finally, the next stop on this forwarding would be Microsoft AD/bridgehead servers, just in case that matters.

      Many thanks in advance,

      .vp


    • mouss
      ... use a shared map that contains all users and for each user contains the host where email should go. you can either use virtual_alias_maps: foo@example.com
      Message 2 of 6 , Jul 29, 2008
        wiskbroom@... wrote:
        > Hello All;
        >
        > I currently have the following setup in my main.cf:
        >
        > alias_maps = dbm:/etc/postfix/aliases, nis:mail.aliases
        >
        > I've also enabled myself to receive email for about 15 domains.
        >
        > Everything works just fine, but because of some new domains I am now charged with maintaining, I am now faced with how I am going to synchronize these new domains users into my aliases, preferably in a way that would require very little effort on my part.
        >
        > What I am looking for is a way to forward all email for say domain XXX.COM to host server-1, if a users account is not found locally in either my aliases dbm or my NIS maps, ditto for domain ZZZ.com to smtp host server-2. Some of the users for XXX.COM might be residing at my domain/environment, therefore I need to first lookup locally before forwarding. Finally, the next stop on this forwarding would be Microsoft AD/bridgehead servers, just in case that matters.
        >


        use a shared map that contains all users and for each user contains the
        host where email should go. you can either use virtual_alias_maps:

        foo@... foo@...

        if the final host doesn't like the rewritten address, you can use
        smtp_generic_maps to rewrite it back (this happens after transports, so
        doesn't break the virtual alias functionality).

        or you can use transports:

        foo@... relay:[host10]

        if you use transports, you need to pre-process the file to remove the
        transport on the host itself (where the transport is obviously local:
        and not relay:[host10]).
      • wiskbroom@hotmail.com
        Thank you mouss! I ve neglected to inform that I am already using transports: inside.XXX.COM smtp:exchange-server.XXX.COM XXX.com
        Message 3 of 6 , Jul 30, 2008
          Thank you mouss!

          I've neglected to inform that I am already using transports:

          inside.XXX.COM             smtp:exchange-server.XXX.COM
          XXX.com                       smtp:exchange-server.XXX.COM
          YYY.com                       smtp:[exchange-server.YYY.COM]
          ZZZ.com                       smtp:[192.168.222.1]

          I need to be able to look aliases *before* using transports. Right now, if I send to a user in domain ZZZ.COM, lookups in aliases do not happen, though I want them to. 

          The reason is that we have users for all domains co-located and all email will flow through me,  and I want to be able to control the final destinations for these few individuals, but for the larger pool of users and DL's, I simply wish for them to just use transports.

          Is there a way to use virtual_alias_maps for a domain *first*, then if not found in there to use transports for a specific domain?  Allowing the exchange server figure out if it is a valid user or not?  Can this be done for say 12 domains?

          Thanks again,

          .vp


          > Date: Wed, 30 Jul 2008 00:44:00 +0200
          > From: mouss@...
          > CC: postfix-users@...
          > Subject: Re: Aliases Lookups, not found? Then Smarthost
          >
          > wiskbroom@... wrote:
          > > Hello All;
          > >
          > > I currently have the following setup in my main.cf:
          > >
          > > alias_maps = dbm:/etc/postfix/aliases, nis:mail.aliases
          > >
          > > I've also enabled myself to receive email for about 15 domains.
          > >
          > > Everything works just fine, but because of some new domains I am now charged with maintaining, I am now faced with how I am going to synchronize these new domains users into my aliases, preferably in a way that would require very little effort on my part.
          > >
          > > What I am looking for is a way to forward all email for say domain XXX.COM to host server-1, if a users account is not found locally in either my aliases dbm or my NIS maps, ditto for domain ZZZ.com to smtp host server-2. Some of the users for XXX.COM might be residing at my domain/environment, therefore I need to first lookup locally before forwarding. Finally, the next stop on this forwarding would be Microsoft AD/bridgehead servers, just in case that matters.
          > >
          >
          >
          > use a shared map that contains all users and for each user contains the
          > host where email should go. you can either use virtual_alias_maps:
          >
          > foo@... foo@...
          >
          > if the final host doesn't like the rewritten address, you can use
          > smtp_generic_maps to rewrite it back (this happens after transports, so
          > doesn't break the virtual alias functionality).
          >
          > or you can use transports:
          >
          > foo@... relay:[host10]
          >
          > if you use transports, you need to pre-process the file to remove the
          > transport on the host itself (where the transport is obviously local:
          > and not relay:[host10]).
          >
        • mouss
          ... please do not top post. ... if you keep neglicting , don t be surprised if people neglect your posts ;-p when asking for help, it is important to give a
          Message 4 of 6 , Jul 30, 2008
            wiskbroom@... wrote:
            > Thank you mouss!
            >

            please do not top post.

            > I've neglected to inform that I am already using transports:

            if you keep "neglicting", don't be surprised if people neglect your
            posts ;-p

            when asking for help, it is important to give a precise description of
            your situation. this includes output of 'postconf -n', relevant logs and
            possibly content of master.cf. but it also includes a summary of the
            problem. in any case, don't say what you think. say what you you see.

            >
            > inside.XXX.COM smtp:exchange-server.XXX.COM
            > XXX.com smtp:exchange-server.XXX.COM
            > YYY.com smtp:[exchange-server.YYY.COM]
            > ZZZ.com smtp:[192.168.222.1]
            >
            > I need to be able to look aliases *before* using transports. Right now, if I send to a user in domain ZZZ.COM, lookups in aliases do not happen, though I want them to.
            >

            which aliases? alias_maps or virtual_alias_maps?

            > The reason is that we have users for all domains co-located and all email will flow through me, and I want to be able to control the final destinations for these few individuals, but for the larger pool of users and DL's, I simply wish for them to just use transports.
            >
            > Is there a way to use virtual_alias_maps for a domain *first*, then if not found in there to use transports for a specific domain? Allowing the exchange server figure out if it is a valid user or not? Can this be done for say 12 domains?

            that's how it works. virtual aliases are expanded before transport. BTW,
            the more you "neglect", the more it will take to understand what problem
            you have.
          • wiskbroom@hotmail.com
            Many thanks for the help mouss, and my apologies for my hiatus... As per my email, I am using NIS and DBM aliases foor all of my users and aliases for them.
            Message 5 of 6 , Oct 1, 2008
              Many thanks for the help mouss, and my apologies for my hiatus...

              As per my email, I am using NIS and DBM aliases foor all of my users and aliases for them.

              What I must do is forward *ALL* email for say example.net to a Microsoft Exchange server, this forward to happen blindly and I do not wish to manage alias tables for users on the PF relay.  I do however wish to process the email for spam and AV in the same way that I would for my regular accounts.

              Man thanks in advance,

              .vp


              > Date: Wed, 30 Jul 2008 00:44:00 +0200
              > From: mouss@...
              > CC: postfix-users@...
              > Subject: Re: Aliases Lookups, not found? Then Smarthost
              >
              > wiskbroom@... wrote:
              > > Hello All;
              > >
              > > I currently have the following setup in my main.cf:
              > >
              > > alias_maps = dbm:/etc/postfix/aliases, nis:mail.aliases
              > >
              > > I've also enabled myself to receive email for about 15 domains.
              > >
              > > Everything works just fine, but because of some new domains I am now charged with maintaining, I am now faced with how I am going to synchronize these new domains users into my aliases, preferably in a way that would require very little effort on my part.
              > >
              > > What I am looking for is a way to forward all email for say domain XXX.COM to host server-1, if a users account is not found locally in either my aliases dbm or my NIS maps, ditto for domain ZZZ.com to smtp host server-2. Some of the users for XXX.COM might be residing at my domain/environment, therefore I need to first lookup locally before forwarding. Finally, the next stop on this forwarding would be Microsoft AD/bridgehead servers, just in case that matters.
              > >
              >
              >
              > use a shared map that contains all users and for each user contains the
              > host where email should go. you can either use virtual_alias_maps:
              >
              > foo@... foo@...
              >
              > if the final host doesn't like the rewritten address, you can use
              > smtp_generic_maps to rewrite it back (this happens after transports, so
              > doesn't break the virtual alias functionality).
              >
              > or you can use transports:
              >
              > foo@... relay:[host10]
              >
              > if you use transports, you need to pre-process the file to remove the
              > transport on the host itself (where the transport is obviously local:
              > and not relay:[host10]).
              >
            • Victor Duchovni
              ... Are you confusing the words forward and relay ? - Forward: Take email destined for recipient A and forward it to recipient B instead of (or sometimes
              Message 6 of 6 , Oct 1, 2008
                On Wed, Oct 01, 2008 at 11:31:32AM -0400, wiskbroom@... wrote:

                >
                > Many thanks for the help mouss, and my apologies for my hiatus...
                >
                > As per my email, I am using NIS and DBM aliases foor all of my users and aliases for them.
                >
                > What I must do is forward *ALL* email for say example.net to a Microsoft Exchange server, this forward to happen blindly and I do not wish to manage alias tables for users on the PF relay. I do however wish to process the email for spam and AV in the same way that I would for my regular accounts.
                >

                Are you confusing the words "forward" and "relay"?

                - Forward: Take email destined for recipient A and forward it
                to recipient B instead of (or sometimes in addition to)
                delivering it to A's mailbox.

                - Relay: Route mail addressed to one or more recipients to a
                a suitable gateway responsible for handling mail to those
                recipients.

                Forwarding is generally done via address rewriting, while relaying
                is done via transport/nexthop selection.

                --
                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.
              Your message has been successfully submitted and would be delivered to recipients shortly.