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

Forwarding to internal servers

Expand Messages
  • Jim Nalepa - US
    Hello, I am looking for assistance with the following scenario. We have two mail locations that we would like to route mail based on an ldap attribute. The
    Message 1 of 4 , Nov 27, 2012
    • 0 Attachment

      Hello,

       

      I am looking for assistance with the following scenario.

       

      We have two mail locations that we would like to route mail based on an ldap attribute. 

       

      The LDAP attribute that is being queried is the internal email address of the user:

        user1@...

        user2@...

       

      Is it possible to rewrite the users email address to the internal address and use MX

      of the rewritten address to direct the mail?  If so what postfix function should be used?

       

      Example:

      user1@... -> mx.example.com --Forwarded--> mail.server1.example.com

      user2@... -> mx.example.com --Forwarded--> mail.server2.example.com

       

      Thanks in advance,

      Jim

    • jeffrey j donovan
      ... Hi jim, check out transport maps http://www.postfix.org/transport.5.html from my experience. I moved away from ldap(network lookups) for transport and
      Message 2 of 4 , Nov 27, 2012
      • 0 Attachment

        On Nov 27, 2012, at 10:13 AM, Jim Nalepa - US <jnalepa@...> wrote:

        Hello,
         
        I am looking for assistance with the following scenario.
         
        We have two mail locations that we would like to route mail based on an ldap attribute. 
         
        The LDAP attribute that is being queried is the internal email address of the user:
         
        Is it possible to rewrite the users email address to the internal address and use MX
        of the rewritten address to direct the mail?  If so what postfix function should be used?
         
        Example:
         
        Thanks in advance,
        Jim

        Hi jim,

        check out transport maps


        from my experience. I moved away from ldap(network lookups) for transport  and switched to a db(local file), each relay has the same transport list. My system was quicker with delivery and lookups.


        -j
      • Jim Nalepa - US
        Jeffrey, Thanks for the prompt response. We are heavily invested in ldap (used centrally throughout network) and would hate to replicate, and maintain two
        Message 3 of 4 , Nov 27, 2012
        • 0 Attachment

          Jeffrey,

           

          Thanks for the prompt response.

          We are heavily invested in ldap (used centrally throughout network) and would hate to replicate, and maintain two instances of the db.

           

          Any other thoughts?

           

          Thanks,

          Jim

          From: jeffrey j donovan [mailto:donovan@...]
          Sent: Tuesday, November 27, 2012 10:29 AM
          To: Jim Nalepa - US
          Cc: postfix-users@...
          Subject: Re: Forwarding to internal servers

           

           

          On Nov 27, 2012, at 10:13 AM, Jim Nalepa - US <jnalepa@...> wrote:



          Hello,

           

          I am looking for assistance with the following scenario.

           

          We have two mail locations that we would like to route mail based on an ldap attribute. 

           

          The LDAP attribute that is being queried is the internal email address of the user:

           

          Is it possible to rewrite the users email address to the internal address and use MX

          of the rewritten address to direct the mail?  If so what postfix function should be used?

           

          Example:

           

          Thanks in advance,

          Jim

           

          Hi jim,

           

          check out transport maps

           

           

          from my experience. I moved away from ldap(network lookups) for transport  and switched to a db(local file), each relay has the same transport list. My system was quicker with delivery and lookups.

           

           

          -j

        • Viktor Dukhovni
          ... The standard advice is: - Use LDAP for virtual_alias_maps and other rewriting done by cleanup(8) - Use indexed files for transport_maps and other lookups
          Message 4 of 4 , Nov 27, 2012
          • 0 Attachment
            On Tue, Nov 27, 2012 at 03:49:42PM +0000, Jim Nalepa - US wrote:

            > Thanks for the prompt response.
            > We are heavily invested in ldap (used centrally throughout network)
            > and would hate to replicate, and maintain two instances of the db.
            >
            > Any other thoughts?

            The standard advice is:

            - Use LDAP for virtual_alias_maps and other rewriting done by
            cleanup(8)

            - Use indexed files for transport_maps and other lookups made
            by trivial-rewrite(8).

            If you want different users in the same domain to be delivered to
            different mailbox servers and want to follow this advice, you use
            virtual_alias_maps (via LDAP is fine) to rewrite:

            mail: Fred.Smith@...
            mailalternateaddress: Frederick.Smith@...
            mailalternateaddress: fsmith@...
            maildrop: fsmith@...

            any one of a user's email addresses to the unique address of the
            underlying mailbox:

            domain = example.com
            query_filter = (|(mail=%s)(mailalternateaddress=%s))
            result_attribute = maildrop

            fancy features for handling LDAP lists are described in LDAP_README.html
            and ldap_table(5).

            The transport table is then largely unnecessary, but in some cases
            you want a common first hop that depends on the mailbox hostname,
            in which case something like:

            imap1.example.com smtp:mailhub.example.com
            ...

            can be handled via small indexed tables on each MTA.

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