emailbuilder88,
> > $sql_select_policy =
> > "SELECT 1 AS id FROM mydomains WHERE ('.' || domain_name) IN (%k)";
>
> By the way, how does this match correctly? If %k is something like
> "[email protected], example.com, @example.com" (or whatever - maybe it's
> just not clear what %k is), then ".example.com" does not match. I know I
> must be misunderstanding this.....
> $sql_lookups_no_at_means_domain = 1;
> Woa, that's a cryptic setting name. :-)
The %k exands into:
when $sql_lookups_no_at_means_domain is 0:
[email protected]
test
@example.com
@.example.com
@.com
@.
or when $sql_lookups_no_at_means_domain is 1:
[email protected]
test@
example.com
.example.com
.com
.
As you can see, the .example.com (with a leading dot) is in the list,
so a ('.' || domain_name) would match. (the || is a contacenation op,
same as a concat() function in MySQL).
Mark