Re: Multiple lookup entries in an SQL table

2021-02-19 Thread Antonio Leding
Thanks Dan & Weitse - very much appreciated… - - - On 19 Feb 2021, at 17:23, Dan Mahoney wrote: From a database point of view, unless you have an ORDER BY statement in your query, the order returned could be either (unless postfix’s code is sorting them). If postfix only wants a single resu

Re: Multiple lookup entries in an SQL table

2021-02-19 Thread Dan Mahoney
From a database point of view, unless you have an ORDER BY statement in your query, the order returned could be either (unless postfix’s code is sorting them). If postfix only wants a single result, then your query would need a LIMIT statement in it. > On Feb 19, 2021, at 5:19 PM, Wietse Ven

Re: Multiple lookup entries in an SQL table

2021-02-19 Thread Wietse Venema
Antonio Leding: > Ok? > > So if I have the following: > > example.com OK > example.com REJECT > > Then the correct Postfix lookup behavior is to return OK,REJECT That is what the database client does. However, there is no Postfix code that wants "OK,REJECT" as a lookup result. Wietse

Re: Multiple lookup entries in an SQL table

2021-02-19 Thread Antonio Leding
Ok… So if I have the following: example.com OK example.com REJECT Then the correct Postfix lookup behavior is to return OK,REJECT Do I understand correctly? Also, I do understand that this type of config would be a corner case and likely not really something to be used so this is really more

Re: Multiple lookup entries in an SQL table

2021-02-19 Thread Viktor Dukhovni
On Fri, Feb 19, 2021 at 11:13:57PM +, Antonio Leding wrote: > I wanted to ask about the expected behavior if there are multiple > entries in an SQL table for the same lookup (IP address, network, > domain, etc.) which specify either the same or different actions > (REJECT, OK, etc.). As do

Multiple lookup entries in an SQL table

2021-02-19 Thread Antonio Leding
Hello Postfix Community, I wanted to ask about the expected behavior if there are multiple entries in an SQL table for the same lookup (IP address, network, domain, etc.) which specify either the same or different actions (REJECT, OK, etc.). - - - example #1 1.2.3.4 OK 1.2.3.4 REJECT