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

Re: virtual-regex problem

Expand Messages
  • Noel Jones
    ... The above example works for me. Did you issue postfix reload after editing the regexp file? -- Noel Jones
    Message 1 of 23 , Feb 14, 2013
    • 0 Attachment
      On 2/14/2013 4:15 PM, Alex wrote:
      > Hi Noel,
      >
      > After implementing changes below:
      >
      >> 1 /^somename.*@example\.com$/ somename@...
      >> 2 /^somename@yahoo\.com$/ somename@...
      >> 3 /./ somelocaluser@...
      >
      > Wildcard line still catching all emails. Any other information I can provide?
      >
      > Thanks
      >


      The above example works for me. Did you issue "postfix reload"
      after editing the regexp file?



      -- Noel Jones
    • Alex
      ... Yes, I am doing postfix reload, I have verified that adding and removing willdcard has effect. Could aliases file have adverse effect?
      Message 2 of 23 , Feb 14, 2013
      • 0 Attachment
        >
        > The above example works for me. Did you issue "postfix reload"
        > after editing the regexp file?


        Yes, I am doing postfix reload, I have verified that adding and
        removing willdcard has effect. Could aliases file have adverse effect?
      • Noel Jones
        ... Lots of things could have adverse effect, but no one knows what you ve done. The sample regexp file provided works for me. -- Noel Jones
        Message 3 of 23 , Feb 14, 2013
        • 0 Attachment
          On 2/14/2013 5:11 PM, Alex wrote:
          >>
          >> The above example works for me. Did you issue "postfix reload"
          >> after editing the regexp file?
          >
          >
          > Yes, I am doing postfix reload, I have verified that adding and
          > removing willdcard has effect. Could aliases file have adverse effect?
          >


          Lots of things could have adverse effect, but no one knows what
          you've done.

          The sample regexp file provided works for me.



          -- Noel Jones
        • Alex
          I have checked my syntax and added another email matching string. It works only if wild card match is not present. As soon as wildcard is added other matches
          Message 4 of 23 , Feb 15, 2013
          • 0 Attachment

            I have checked my syntax and added another email matching string. It works only if wild card match is not present. As soon as wildcard is added other matches stop working.  I can see in the maillog that initially regex is happening and then wildcard takes over. Is there anything else I can look at it? Thank you

          • Noel Jones
            ... As documented, virtual_alias_maps lookups are recursive, meaning the map is searched repeatedly until either there is no result, or the result is the same
            Message 5 of 23 , Feb 15, 2013
            • 0 Attachment
              On 2/15/2013 10:34 AM, Alex wrote:
              > I have checked my syntax and added another email matching string. It
              > works only if wild card match is not present. As soon as wildcard is
              > added other matches stop working. I can see in the maillog that
              > initially regex is happening and then wildcard takes over. Is there
              > anything else I can look at it? Thank you
              >

              As documented, virtual_alias_maps lookups are recursive, meaning the
              map is searched repeatedly until either there is no result, or the
              result is the same as the lookup key.

              To keep the wildcard from grabbing everything (wildcards are evil),
              your map must have extra entries to "protect" the addresses you
              don't want grabbed by the wildcard. This is called a 1-1 mapping entry.

              Your map must be structured similar to:

              A -> B # rewrite A to B
              B -> B # 1-1 mapping to protect B from wildcard
              wildcard # wildcard matches everything

              Your map is missing the 1-1 mapping entry, so the wildcard matches
              everything.




              -- Noel Jones
            • Alex
              It seems that regex is indeed working, but something is forcing email into local host instead of outside. This only happens with wildcard in place. Here is an
              Message 6 of 23 , Feb 15, 2013
              • 0 Attachment
                It seems that regex is indeed working, but something is forcing email
                into local host instead of outside. This only happens with wildcard in
                place.

                Here is an extract from maillog:

                Feb 15 14:30:54 qa6 postfix/error[9898]: A6EC61F88989:
                to=<somename@...>, orig_to=<somename@...>, relay=none,
                delay=0.02, delays=0.01/0/0/0.01, dsn=5.0.0, status=bounced (User
                unknown in virtual alias table)
              • Noel Jones
                ... Postfix is documented here: http://www.postfix.org/documentation.html -- Noel Jones
                Message 7 of 23 , Feb 15, 2013
                • 0 Attachment
                  On 2/15/2013 4:35 PM, Alex wrote:
                  > It seems that regex is indeed working, but something is forcing email
                  > into local host instead of outside. This only happens with wildcard in
                  > place.
                  >
                  > Here is an extract from maillog:
                  >
                  > Feb 15 14:30:54 qa6 postfix/error[9898]: A6EC61F88989:
                  > to=<somename@...>, orig_to=<somename@...>, relay=none,
                  > delay=0.02, delays=0.01/0/0/0.01, dsn=5.0.0, status=bounced (User
                  > unknown in virtual alias table)
                  >


                  Postfix is documented here:
                  http://www.postfix.org/documentation.html


                  -- Noel Jones
                • Alex
                  Hi Noel, Furthermore wildcard seems to have an effect only on email addresses for the parent domain of the postfix host. If I send email to @yahoo and regex
                  Message 8 of 23 , Feb 15, 2013
                  • 0 Attachment
                    Hi Noel,

                    Furthermore wildcard seems to have an effect only on email addresses
                    for the parent domain of the postfix host.
                    If I send email to @yahoo and regex changes it to @..., this works fine.
                    If I send email to @mydomain regex changes it to wildcard.

                    Does it make sense?
                  • Noel Jones
                    ... I m sure postfix is doing exactly what you ve told it to do. Postfix is documented here: http://www.postfix.org/documentation.html -- Noel Jones
                    Message 9 of 23 , Feb 15, 2013
                    • 0 Attachment
                      On 2/15/2013 5:25 PM, Alex wrote:
                      > Hi Noel,
                      >
                      > Furthermore wildcard seems to have an effect only on email addresses
                      > for the parent domain of the postfix host.
                      > If I send email to @yahoo and regex changes it to @..., this works fine.
                      > If I send email to @mydomain regex changes it to wildcard.
                      >
                      > Does it make sense?
                      >


                      I'm sure postfix is doing exactly what you've told it to do.

                      Postfix is documented here:
                      http://www.postfix.org/documentation.html



                      -- Noel Jones
                    • Alex
                      No doubt about it. I just wish I can understand how to change it. :) Any ideas?
                      Message 10 of 23 , Feb 15, 2013
                      • 0 Attachment
                        No doubt about it. I just wish I can understand how to change it. :)
                        Any ideas?
                      • /dev/rob0
                        ... Did you see my post yesterday? Pay close attention to the setting (unsetting, actually) of virtual_alias_domains.
                        Message 11 of 23 , Feb 15, 2013
                        • 0 Attachment
                          On Fri, Feb 15, 2013 at 02:35:31PM -0800, Alex wrote:
                          > It seems that regex is indeed working, but something is forcing
                          > email into local host instead of outside. This only happens with
                          > wildcard in place.
                          >
                          > Here is an extract from maillog:
                          >
                          > Feb 15 14:30:54 qa6 postfix/error[9898]: A6EC61F88989:
                          > to=<somename@...>, orig_to=<somename@...>, relay=none,
                          > delay=0.02, delays=0.01/0/0/0.01, dsn=5.0.0, status=bounced (User
                          > unknown in virtual alias table)

                          Did you see my post yesterday? Pay close attention to the setting
                          (unsetting, actually) of virtual_alias_domains.

                          http://www.postfix.org/ADDRESS_CLASS_README.html#virtual_alias_class
                          http://www.postfix.org/VIRTUAL_README.html#virtual_alias
                          http://www.postfix.org/postconf.5.html#virtual_alias_domains
                          http://www.postfix.org/postconf.5.html#virtual_alias_maps
                          --
                          http://rob0.nodns4.us/ -- system administration and consulting
                          Offlist GMX mail is seen only if "/dev/rob0" is in the Subject:
                        • Alex
                          Solved. One typo. I guess I was staring at the file to long.
                          Message 12 of 23 , Feb 15, 2013
                          • 0 Attachment
                            Solved. One typo. I guess I was staring at the file to long.
                          Your message has been successfully submitted and would be delivered to recipients shortly.