On Mon, Apr 25, 2011 at 03:16:42PM +0200, Reindl Harald wrote:

> > No, in both cases '%s' is the lookup key and '%d' is its domain part, if
> > the lookup key is an address of the form localpart@domain. When '%d' or
> > '%u' is used in the query template, lookups with keys that are not of the
> > form 'localpart@domain' are suppressed.
> 
> you said the same as i in other words :-)

No, I said that Postfix tables work with lookup keys and lookup values,
not with higher semantic constructs such as sender vs. recipient addresses.

> sometimes it would be really useful to build a query
> depending on sender AND rcpt whis is AFAIK not possible

Not possible, because Postfix table driven mechanisms (virtual(5),
generic(5), access(5), ...) are implemented over a key/value table
abstraction layer that supports multiple implementations:

    - CDB
    - Berkeley DB "hash" and "btree"
    - Legacy DBM
    - LDAP
    - PgSQL
    - MySQL
    - SQLite
    ...

In all cases the table driven mechanisms just see a key/value table, and
don't know anything about the internal capabilities of the table driver.
In addition, tables don't know the semantics of the keys or values.

-- 
        Viktor.

Reply via email to