If I understand correctly, you simply changed which part of the regular
expression was captured. That does not solve my problem, as it still will
cause all requests to hit the database, even when the domain exists in the
hash file.

Desired flow when the sender's domain DOES exist in the hash file:

lookup us...@example2.com in the hash file. FAIL
lookup us...@exampe5.com in the regex. FAIL - skip checking postgres
lookup @example2.com in the has file. PASS

Desired flow when the sender's domain DOES NOT exist in the hash file:

lookup us...@example5.com in the hash file. FAIL
lookup us...@example5.com in the regex. FAIL - skip checking postgres
lookup @example5.com in the hash file. FAIL
lookup @example5.com in the regex. PASS
lookup @example5.com in postgres


With your solution, the regex will pass during the first pass, so there
will never be an attempt to lookup just the domain in the hash file.


> > The nouser file contains one pattern:
> > /^(@.*)/  ${1}
>
>     /(@[^"@]+)$/ ${1}
>
> Or, perhaps:
>
>     /@([^"@]+)$/ ${1}
>
> With no leading "@" in the Postgresql data.
>
> --
>     Viktor.
> _______________________________________________
> Postfix-users mailing list -- postfix-users@postfix.org
> To unsubscribe send an email to postfix-users-le...@postfix.org
>
_______________________________________________
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org

Reply via email to