On Tue, Mar 17, 2015 at 07:16:55PM +0200, John Bees wrote:

> Would the following setup work as intended? Meaning my exceptions-list is
> checked first;
> 
> transport_maps =  hash:/etc/postfix/exceptions, hash:/etc/postfix/transport

Table lookups happen in the order in which the tables are specified, keep
in mind that with partial keys, the loop is:

        for key in full-key, partial-keys, ...
            for table in table1, table2, ...
                if value = lookup(key, table)
                    return value
        return not-found

So "surprises" are possible if the first table contains only partials
keys (say domain names), while the second table contains full keys
(full addresses which are checked first).

> /etc/postfix/exceptions:
>  [email protected] :[x.x.x.x]
> [email protected] :[x.x.x.x]

That leading space in " spamtrap" looks odd, make sure this is not
the case in the actual input file.

> hash:/etc/postfix/transport:
> #wildcards instead of defining each user one by one
> # [email protected]  :[x.x.x.x]
> # [email protected]  :[x.x.x.x]
> example.com  :[x.x.x.x]
> .example.com :[x.x.x.x]

You'd be much better off putting both the full keys (user@domain
exceptions) and the partial keys (domain defaults) in a single
table.  I see no reason to use two tables here.

Just concatenate the input files and build a single table.

-- 
        Viktor.

Reply via email to