On Tue, Mar 18, 2014 at 03:20:16PM +0000, Alan Chandler wrote:

> What I am becoming to realise - but which I can't find documented anywhere
> is that there is a subtle difference between a map of domains (as keys) and
> a map of e-mail addresses (as keys), and although the documentation tells
> you that virtual_mailbox_domains defaults to virtual_mailbox_maps, it
> actually can't because the former is a list of domains and the latter is a
> list of e-mail addresses, and it cannot extract the domains from the e-mail
> addresses.

This is silly.  Postfix extracts values from (key, value) lookup
tables.  When the table is used to define a set of member domains,
it must contain domains as lookup keys.  When the table is used to
map addresses to other addresses or to an access rule, it must
contain addresses as lookup keys.  Tables can contain both address
and domain lookup keys.  It is entirely up to you what keys and values
you put in your tables.

The only subtle point is that with LDAP, MySQL, PgSQL tables the
"domain = <list>" table configuration parameter, when set non-empty,
will suppress all lookups with keys that are not of the form
"user@domain" for some domain listed by the "domain = " parameter.
So tables with a "domain = " constraint can't be used for
virtual_mailbox_domains, bare user names, ...

-- 
        Viktor.

Reply via email to