> Rene Bartsch:
>> > I hope you are not trying to list all domains with every query. For
virtual_(alias|mailbox)_domains or mydestination using a mysql map, Postfix 
expect to give a
domain to a query .
>> > If *any* result is returned, the return value is ignored and the lookup is 
>> > considered a success.
>> >
>> > This can be where Postfix is confusing all domains to be relayed locally.
>> >
>> > An example:
>> > query = SELECT 1 from domains where domain='%s'
>>
>> You're my hero! ;)
>>
>> After changing the MySQL-query to return '1' or nothing in
>> "mysql:/etc/postfix/sql-virtual_mailbox_domains.cf" it works like a charm! :)
>
> This is documented in http://www.postfix.org/DATABASE_README.html#lists
>
> In addition, http://www.postfix.org/DATABASE_README.html#preparing has 
> instructions on how to
test things first with static text files and on how to verify the move to LDAP 
or *SQL
databases.
>
> It is a good idea to study DATABASE_README before sinking lots
> of time into trouible shooting.
>
>       Wietse

Sorry, I had the approach according to the DBMail-Setup-Wiki running for years, 
but after changing
machine and distro I didn't got it working again. So I didn't consider the 
MySQL-queries but some
kind of configuration error. Maybe you could add an example to the docs for 
returning "1" or a
empty set to point out what returning "keys" means.

What does Postfix evaluate when values are returned in lists or can you just 
add a error message?

Best regards,

Renne




Reply via email to