On Tue, Nov 23, 2010 at 06:53:44PM +0000, Andrew Beverley wrote:

> > Note, that the above applies also to "bare" domain queries, so tables
> > with "domain =" constraints cannot be used to store the list of
> > virtual_alias_domains, virtual_mailbox_domains, ... Not a problem,
> > since after hardcoding the candidate domains in the table definition,
> > there is really no point in using a database at all, just list the
> > domains in main.cf.
> 
> I would like to move the list of virtual domains to a SQL table, as
> opposed to being hard-coded anywhere. Most of my email is outbound, so
> if I can avoid database lookups for all outbound mail then that would be
> preferable.

In that case, you have to tolerate the additional queries. Postfix
never loads the full list of domains into memory, if you store them
in a table, Postfix, at any time, only asks whether a particular
domain is of a given type or not.

The virtual(5) mapping applies to *all* addresses, if you want to
restrict it to a set of domains, to avoid extra queries, then
that list of domains must not require a query! So you either
declare it statically, or build a database beefy enough to
deal with the additional query load.

-- 
        Viktor.

Reply via email to