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

Re: A question on building mail gateway with Postfix

Expand Messages
  • wadia
    ... after I define the relayhost in main.cf just like: relayhost = [10.127.0.1] and /etc/postfix/transport aaa.com smtp:[10.127.0.2] I find that all the
    Message 1 of 10 , Nov 1, 2006
    • 0 Attachment
      Devdas Bhagat wrote:
      > On 01/11/06 01:55 +0800, wadia wrote:
      >
      >> Hi All
      >> Currently, I'm going to build a mail gateway by using postfix, and the
      >> following is my requirements:
      >> 1) all the mails to aaa.com will be transferred to aaa.my.com pool.
      >> 2) all the mails to bbb.com will be transferred to bbb.my.com pool.
      >> 3) and all the other mails will be transferred to ccc.my.com pool.
      >>
      >> From the postfix document, I know that I can define 'transport' file
      >> like the following to finish 1) and 2), but I still have no idea how to
      >> configure postfix to make all the other mails transfer to ccc.my.com
      >> pool. Any body can help me? You help is appreciated.
      >>
      >>
      > Use relayhost, or a wildcard transport.
      >
      > Devdas Bhagat
      >
      >
      >
      >
      after I define the 'relayhost' in main.cf just like:
      relayhost = [10.127.0.1]

      and /etc/postfix/transport
      aaa.com smtp:[10.127.0.2]

      I find that all the mails including from aaa.com are transferred to
      10.127.0.1. And the mail from aaa.com is not transferred to 10.127.0.2,
      is there any wrong with my configuration?

      thanks
      wadia
    • Sandy Drobic
      ... - Did you execute postmap hash:/etc/postfix/transport ? - Is /etc/postfix/transport actually in your configuration? What does postconf transport_maps
      Message 2 of 10 , Nov 1, 2006
      • 0 Attachment
        wadia wrote:
        > Devdas Bhagat wrote:
        >> On 01/11/06 01:55 +0800, wadia wrote:
        >>
        >>> Hi All
        >>> Currently, I'm going to build a mail gateway by using postfix, and
        >>> the following is my requirements:
        >>> 1) all the mails to aaa.com will be transferred to aaa.my.com pool.
        >>> 2) all the mails to bbb.com will be transferred to bbb.my.com pool.
        >>> 3) and all the other mails will be transferred to ccc.my.com pool.
        >>>
        >>> From the postfix document, I know that I can define 'transport' file
        >>> like the following to finish 1) and 2), but I still have no idea how
        >>> to configure postfix to make all the other mails transfer to
        >>> ccc.my.com pool. Any body can help me? You help is appreciated.
        >>>
        >>>
        >> Use relayhost, or a wildcard transport.
        >>
        >> Devdas Bhagat
        >>
        >>
        >>
        >>
        > after I define the 'relayhost' in main.cf just like:
        > relayhost = [10.127.0.1]
        >
        > and /etc/postfix/transport
        > aaa.com smtp:[10.127.0.2]
        >
        > I find that all the mails including from aaa.com are transferred to
        > 10.127.0.1. And the mail from aaa.com is not transferred to 10.127.0.2,
        > is there any wrong with my configuration?

        - Did you execute "postmap hash:/etc/postfix/transport"?

        - Is /etc/postfix/transport actually in your configuration?
        What does "postconf transport_maps" say?

        Sandy
        --
        List replies only please!
        Please address PMs to: news-reply2 (@) japantest (.) homelinux (.) com
      • wadia
        ... Hi Sandy Now this mail gateway basically works, thanks for your hlep! But now I still face some problems with it, Assume I owned domain name *my.com*, this
        Message 3 of 10 , Nov 2, 2006
        • 0 Attachment
          Sandy Drobic wrote:
          > wadia wrote:
          >> Devdas Bhagat wrote:
          >>> On 01/11/06 01:55 +0800, wadia wrote:
          >>>
          >>>> Hi All
          >>>> Currently, I'm going to build a mail gateway by using postfix, and
          >>>> the following is my requirements:
          >>>> 1) all the mails to aaa.com will be transferred to aaa.my.com pool.
          >>>> 2) all the mails to bbb.com will be transferred to bbb.my.com pool.
          >>>> 3) and all the other mails will be transferred to ccc.my.com pool.
          >>>>
          >>>> >From the postfix document, I know that I can define 'transport'
          >>>> file like the following to finish 1) and 2), but I still have no
          >>>> idea how to configure postfix to make all the other mails transfer
          >>>> to ccc.my.com pool. Any body can help me? You help is appreciated.
          >>>>
          >>>>
          >>> Use relayhost, or a wildcard transport.
          >>>
          >>> Devdas Bhagat
          >>>
          >>>
          >>>
          >>>
          >> after I define the 'relayhost' in main.cf just like:
          >> relayhost = [10.127.0.1]
          >>
          >> and /etc/postfix/transport
          >> aaa.com smtp:[10.127.0.2]
          >>
          >> I find that all the mails including from aaa.com are transferred to
          >> 10.127.0.1. And the mail from aaa.com is not transferred to
          >> 10.127.0.2, is there any wrong with my configuration?
          >
          > - Did you execute "postmap hash:/etc/postfix/transport"?
          >
          > - Is /etc/postfix/transport actually in your configuration?
          > What does "postconf transport_maps" say?
          >
          > Sandy
          Hi Sandy
          Now this mail gateway basically works, thanks for your hlep!

          But now I still face some problems with it,
          Assume I owned domain name *my.com*, this mail gateway hostname is
          *gw.my.com/IP: 10.0.0.1*, I have three pools, one is *aaa.my.com/IP:
          10.0.0.2*, and another is *bbb.my.com/IP: 10.0.0.3*, and the mail to
          other domain will relay to *ccc.my.com/IP: 10.0.0.4*.

          I define relayhost = [ccc.my.com] in main.cf
          and my /etc/postfix/transport file looks like:
          aaa.com smtp:[10.0.0.2]
          bbb.com smtp:[10.0.0.3]

          The problem is when a system mail just like root@... or
          root@... sent out from this gateway, then this mail loops between
          gateway and ccc.my.com box, how can I fix it?


          Thanks
          Waida
        • Sandy Drobic
          ... This is probably your trouble. You set transports for two domains, and transfer all other mails to ccc.my.com. Unfortunately, ccc.my.com doesn t know what
          Message 4 of 10 , Nov 3, 2006
          • 0 Attachment
            wadia wrote:
            > Sandy Drobic wrote:
            >> wadia wrote:
            >>> Devdas Bhagat wrote:
            >>>> On 01/11/06 01:55 +0800, wadia wrote:
            >>>>
            >>>>> Hi All
            >>>>> Currently, I'm going to build a mail gateway by using postfix, and
            >>>>> the following is my requirements:
            >>>>> 1) all the mails to aaa.com will be transferred to aaa.my.com pool.
            >>>>> 2) all the mails to bbb.com will be transferred to bbb.my.com pool.
            >>>>> 3) and all the other mails will be transferred to ccc.my.com pool.

            This is probably your trouble. You set transports for two domains, and
            transfer all other mails to ccc.my.com. Unfortunately, ccc.my.com doesn't
            know what to do with mail to "my.com" or subdomains unconfigured
            subdomains of my.com.

            How to fix that depends on the setup of ccc.my.com. If the users are all
            the same in the various domains, then you can just include my.com into
            $parent_domain_matches_subdomains (if my.com is included in
            mydestination). Otherwise you need to set up the domains with a bit more care.

            > But now I still face some problems with it,
            > Assume I owned domain name *my.com*, this mail gateway hostname is
            > *gw.my.com/IP: 10.0.0.1*, I have three pools, one is *aaa.my.com/IP:
            > 10.0.0.2*, and another is *bbb.my.com/IP: 10.0.0.3*, and the mail to
            > other domain will relay to *ccc.my.com/IP: 10.0.0.4*.
            >
            > I define relayhost = [ccc.my.com] in main.cf
            > and my /etc/postfix/transport file looks like:
            > aaa.com smtp:[10.0.0.2]
            > bbb.com smtp:[10.0.0.3]
            >
            > The problem is when a system mail just like root@... or
            > root@... sent out from this gateway, then this mail loops between
            > gateway and ccc.my.com box, how can I fix it?

            You either need to rewrite root@... to an accepted domain or tell
            ccc.my.com how to handle mail to my.com.

            Sandy

            --
            List replies only please!
            Please address PMs to: news-reply2 (@) japantest (.) homelinux (.) com
          Your message has been successfully submitted and would be delivered to recipients shortly.