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

Re: problem with virtual users on postfix 2.1.5 on fc3

Expand Messages
  • ankush grover
    ... my virtual files contains like this, there are some other users who entries are also there user2@testing.com user2 -- local account
    Message 1 of 9 , Jun 2, 2006
      >
      > Not sure if I understand your question correctly, but it
      > sounds as if you need to add virtual entries for the user
      > to rewrite them to their ISP address.

      my virtual files contains like this, there are some other users who
      entries are also there

      user2@... user2 -->local account
      user1@... user1@... -->ISP
      account

      The user1 does not have any mailbox on this mail server as its mailbox
      is with the ISP. When somebody from the
      Internal Mail Server sends the mail to the user1@... it gets
      rejected with the below error message

      16:57:46 test1 postfix/smtpd[11206]: NOQUEUE: reject: RCPT from
      test1.sun.net[192.168.1.125]: 550 <user1@...>: Recipient
      address rejected: User unknown in virtual alias table;
      from=<ankush@...> to=<user1@...> proto=ESMTP
      helo=<test1.sun.net>

      Even though the user1 is listed in the virtual file.

      What I wanted is to redirect the mail for the user1@... to the isp ?

      Thanks & Regards

      Ankush Grover
    • Noel Jones
      At 01:52 AM 6/3/2006, ankush grover wrote: my virtual files contains like this, there are some other users who ... Users listed in a virtual_alias_domains
      Message 2 of 9 , Jun 3, 2006
        At 01:52 AM 6/3/2006, ankush grover wrote:
        my virtual files contains like this, there are some other
        users who
        >entries are also there
        >
        >user2@... user2 -->local account
        >user1@... user1@... -->ISP
        >
        >account
        >
        >The user1 does not have any mailbox on this mail server as
        >its mailbox
        >is with the ISP. When somebody from the
        >Internal Mail Server sends the mail to the
        >user1@... it gets
        >rejected with the below error message
        >
        >16:57:46 test1 postfix/smtpd[11206]: NOQUEUE: reject: RCPT from
        >test1.sun.net[192.168.1.125]: 550 <user1@...>:
        >Recipient
        >address rejected: User unknown in virtual alias table;
        >from=<ankush@...> to=<user1@...> proto=ESMTP
        >helo=<test1.sun.net>
        >
        >Even though the user1 is listed in the virtual file.
        >
        >What I wanted is to redirect the mail for
        >the user1@... to the isp ?

        Users listed in a virtual_alias_domains domain *must* be
        rewritten to another domain to be valid.
        Maybe you can alias the user to a local "helper" address,
        use a transport_maps entry to route the helper address to
        the ISP, and use smtp_generic_maps to rewrite the address
        to the correct ISP form when it's sent out. Maybe someone
        else has a better solution.
        http://www.postfix.org/postconf.5.html#transport_maps
        http://www.postfix.org/ADDRESS_REWRITING_README.html#generic
        http://www.postfix.org/postconf.5.html#smtp_generic_maps



        --
        Noel Jones
      • Victor Duchovni
        ... To the OP: That would be wrong, as the ISP will return the mail back to you. A virtual alias domain, is your domain, you are the primary MX host, but the
        Message 3 of 9 , Jun 3, 2006
          On Sat, Jun 03, 2006 at 11:12:55AM -0500, Noel Jones wrote:

          > >user1@... user1@... -->ISP
          > >
          > >16:57:46 test1 postfix/smtpd[11206]: NOQUEUE: reject: RCPT from
          > >test1.sun.net[192.168.1.125]: 550 <user1@...>:
          > >Recipient address rejected: User unknown in virtual alias table;
          > >from=<ankush@...> to=<user1@...> proto=ESMTP
          > >helo=<test1.sun.net>

          > >What I wanted is to redirect the mail for
          > >the user1@... to the isp ?

          To the OP: That would be wrong, as the ISP will return the mail back
          to you. A virtual alias domain, is your domain, you are the primary
          MX host, but the domain has *zero* mailboxes per-se, all the addresses
          are rerouted to real mailboxes in *other* domains. If either of these
          conditions is false, DO NOT configure the domain as a virtual alias
          domain.

          > Users listed in a virtual_alias_domains domain *must* be
          > rewritten to another domain to be valid.

          True.

          > Maybe you can alias the user to a local "helper" address,
          > use a transport_maps entry to route the helper address to
          > the ISP, and use smtp_generic_maps to rewrite the address
          > to the correct ISP form when it's sent out. Maybe someone
          > else has a better solution.
          > http://www.postfix.org/postconf.5.html#transport_maps
          > http://www.postfix.org/ADDRESS_REWRITING_README.html#generic
          > http://www.postfix.org/postconf.5.html#smtp_generic_maps

          Bad advice I think, better to just list the domain in relay_domains if
          indeed some addresses are forward off-site and others rewritten. WHo
          exactly is the primary MX host for this domain?

          --
          Viktor.

          P.S. Morgan Stanley is looking for a New York City based, Senior Unix
          system/email administrator to architect and sustain the Unix email
          environment. If you are interested, please drop me a note.

          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.
        • ankush grover
          ... the primary MX is with my ISP. We have 3 accounts with the ISP 2 accounts my directors are using and 1 is catchall box. I download the mails from the
          Message 4 of 9 , Jun 4, 2006
            > To the OP: That would be wrong, as the ISP will return the mail back
            > to you. A virtual alias domain, is your domain, you are the primary
            > MX host, but the domain has *zero* mailboxes per-se, all the addresses
            > are rerouted to real mailboxes in *other* domains. If either of these
            > conditions is false, DO NOT configure the domain as a virtual alias
            > domain.
            >
            > Bad advice I think, better to just list the domain in relay_domains if
            > indeed some addresses are forward off-site and others rewritten. WHo
            > exactly is the primary MX host for this domain?
            >

            the primary MX is with my ISP. We have 3 accounts with the ISP 2
            accounts my directors are using and 1 is catchall box. I download the
            mails from the catchall mailbox through this Postfix server and
            distribute it among the users inside my LAN. I have configured
            virtual_alias_domains. Problem is when a user from my LAN wants to
            send the mail to my directors that mail gets bounced with the error
            message "user not mentioned in the virtual user table".

            for example

            user2 inside the LAN sends the mail to the director
            (user1@...) this mail is rejected by the Postfix with the
            above mentioned error.

            my virtual file is like this

            user1@... user1
            user2@... user2@...
            user3@... user3@...

            What I wanted is that mails for user1 and user3 (both my directors
            accounts) should go to my ISP where they have got their respective
            mailboxes ?

            How can I achieve the above with the virtual_alias_domains=testing.com
            and the postfix rejecting the mail with the error "user not listed in
            the virtual user table" ?


            Is it possible with the postfix or not ?


            Thanks & Regards

            Ankush Grover
          • Devdas Bhagat
            On 04/06/06 13:36 +0530, ankush grover wrote: ... A catchall is a bad idea. Why not get real mailboxes for users? Please use example.(com|org|net) for
            Message 5 of 9 , Jun 4, 2006
              On 04/06/06 13:36 +0530, ankush grover wrote:
              <snip>
              > the primary MX is with my ISP. We have 3 accounts with the ISP 2
              > accounts my directors are using and 1 is catchall box. I download the
              > mails from the catchall mailbox through this Postfix server and

              A catchall is a bad idea. Why not get real mailboxes for users?

              Please use example.(com|org|net) for example domains. testing.com is
              registered to testing foundations, IL, US.

              > distribute it among the users inside my LAN. I have configured
              > virtual_alias_domains. Problem is when a user from my LAN wants to
              > send the mail to my directors that mail gets bounced with the error
              > message "user not mentioned in the virtual user table".
              >
              First find out if your ISP will also accept mail for a subdomain of your
              domain. If they do, then configure Postfix like this:

              main.cf:
              mydestination = local.example.com
              virtual_alias_domains = example.com
              virtual_alias_maps = hash:/etc/postfix/virtual

              virtual:
              director1@... director1@...
              director2@... director2@...
              user1@... user1@...
              ..
              ..

              If the ISP will not accept mail for a subdomain
              virtual:
              director1@... director1@...
              director2@... director2@...
              user1@... user1@...
              ..
              ..

              main.cf:
              mydestination = local.example.com
              virtual_alias_domains = example.com
              virtual_alias_maps = hash:/etc/postfix/virtual
              transport_maps = hash:/etc/postfix/transport

              transport:
              example.com smtp:[ip.of.isp.server]

              should work.

              Another alternative would be to use relay_domains and a per user
              transport, which would be a cleaner alternative than the second
              solution.

              main.cf:
              relay_domains = example.com
              transport_maps = hash:/etc/postfix/transport

              transport:
              director1@... smtp:[ip.of.isp.server]
              director2@... smtp:[ip.of.isp.server]
              user1@... local:
              user2@... local:
              ..

              One requirement of SMTP is that one domain maps to exactly one host.
              When we need to use multiple domains, we work arond this limitation by
              rewriting envelope addresses to match the appropriate hosts. Note that
              the rewritten addresses need not be visible outside your organisation.

              Devdas Bhagat
            • Noel Jones
              ... OP previously stated that the address in question is not forwarded, so no mail loop. Nonetheless, my advice may not be in the OP s best interest. OP should
              Message 6 of 9 , Jun 4, 2006
                At 11:22 AM 6/3/2006, Victor Duchovni wrote:
                >On Sat, Jun 03, 2006 at 11:12:55AM -0500, Noel Jones wrote:
                > > >What I wanted is to redirect the mail for
                > > >the user1@... to the isp ?
                >
                >To the OP: That would be wrong, as the ISP will return the
                >mail back
                >to you.

                OP previously stated that the address in question is not
                forwarded, so no mail loop.
                Nonetheless, my advice may not be in the OP's best interest.

                OP should probably reevaluate the entire mail setup and get
                rid of the catchall address.

                --
                Noel Jones
              • Victor Duchovni
                ... In that case do not implement this as a virtual alias domain. Virtual alias domains are final , your machine is responsible for final delivery (by
                Message 7 of 9 , Jun 4, 2006
                  On Sun, Jun 04, 2006 at 01:36:07PM +0530, ankush grover wrote:

                  > >Bad advice I think, better to just list the domain in relay_domains if
                  > >indeed some addresses are forward off-site and others rewritten. WHo
                  > >exactly is the primary MX host for this domain?
                  > >
                  >
                  > the primary MX is with my ISP.

                  In that case do not implement this as a virtual alias domain. Virtual
                  alias domains are "final", your machine is responsible for "final
                  delivery" (by rewriting and forwarding) of all for the domain.

                  If you are also an MX host for the domain, set it up as a relay_domain.
                  Otherwise it is an ordinary external domain.

                  > my virtual file is like this
                  >
                  > user1@... user1
                  > user2@... user2@...
                  > user3@... user3@...

                  If this domain belongs to the ISP, forward all mail to the ISP. For
                  local mail use a different domain, and for local users whose mailboxes
                  are only with the ISP, rewrite the local address to an ISP address.
                  Don't try to both in the same domain.

                  > What I wanted is that mails for user1 and user3 (both my directors
                  > accounts) should go to my ISP where they have got their respective
                  > mailboxes ?
                  >
                  > How can I achieve the above with the virtual_alias_domains=testing.com
                  > and the postfix rejecting the mail with the error "user not listed in
                  > the virtual user table" ?

                  Do not list a domain you don't control in virtual_alias_domains.

                  --
                  Viktor.

                  P.S. Morgan Stanley is looking for a New York City based, Senior Unix
                  system/email administrator to architect and sustain the Unix email
                  environment. If you are interested, please drop me a note.

                  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.