mailing lists:
> Hello all,
>
> The mysql_table does lookups in the form of key/value pairs, so if I want
> match subdomains only for some domains, like the ones in the following mysql
> table:
>
>
>
> > select * from transport;
> +--------------+----------------+
> | lhs | rhs |
> +--------------+----------------+
> | .example.bar | smtp:relay.bar |
> | example.bar | smtp:relay.bar |
> | example.foo | smtp:relay.foo |
> +--------------+----------------+
> 3 rows in set (0.00 sec)
>
>
> with "query = SELECT rhs FROM transport WHERE lhs = '%d'" it only works for
> exact matches and fails with subdomain matches:
>
> # postmap -q [email protected] mysql:/etc/postfix/mysql-transport.conf
> smtp:relay.foo
> # postmap -q [email protected] mysql:/etc/postfix/mysql-transport.conf
> smtp:relay.bar
> # postmap -q [email protected] mysql:/etc/postfix/mysql-transport.conf
> #
This is working as documented. As described under "TABLE LOOKUP
ORDER", the transport_map lookup code generates the .example.bar
query after the user@domain and domain queries produce no result.
Wietse