On Sun, Nov 21, 2010 at 04:50:21PM -0500, Jerrale G wrote:

> On 11/21/2010 4:40 PM, Andrew Beverley wrote:
>> Hi,
>>
>> I have noticed that my Postfix (version 2.3.8) is performing a
>> virtual_alias_maps mysql database query for every email that it is
>> processing, even if the domain is not listed in virtual_alias_domains.

This is correct behaviour. The rewriting performed by virtual(5) is
documented and intended to apply to *all* addresses.

If you have an SQL or LDAP table that stores data for only a specific
set of domains, you can use the "domain = ..." attribute of LDAP, or
SQL tables to specify which domains the table applies to, and queries
for unrelated domains will be skipped.

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.

-e 
        Viktor.

Reply via email to