Re: About table search order: not to query 'user+extens...@domain.ltd'

2015-03-12 Thread Viktor Dukhovni
On Wed, Mar 11, 2015 at 11:32:43PM +0800, Zhang Huangbin wrote: Dear all, According to Postfix document, virtual(8), 'user+extens...@domain.ltd' is looked up first, then 'u...@domain.ltd'. Is it possible to skip/ignore the address extension and just query 'u...@domain.ltd'? (by the way, i

Re: About table search order: not to query 'user+extens...@domain.ltd'

2015-03-12 Thread Viktor Dukhovni
On Wed, Mar 11, 2015 at 11:55:31PM +0800, Zhang Huangbin wrote: On Wed, Mar 11, 2015 at 11:46 PM, Viktor Dukhovni postfix-us...@dukhovni.org wrote: Not at present. You can only suppress lookups for bare keys which can happen when the domain is $myorigin or matches $mydestination by

Re: About table search order: not to query 'user+extens...@domain.ltd'

2015-03-12 Thread Zhang Huangbin
On Thu, Mar 12, 2015 at 12:10 AM, Viktor Dukhovni postfix-us...@dukhovni.org wrote: In this case, SQL is flexible. but any solution for LDAP table? we cannot do this in ldap query filter. No. OK, thanks. BTW, any plan to support this (ignore '+extension' in table lookup)?

Re: About table search order: not to query 'user+extens...@domain.ltd'

2015-03-11 Thread Zhang Huangbin
On Thu, Mar 12, 2015 at 12:03 AM, Viktor Dukhovni postfix-us...@dukhovni.org wrote: You may well be able to do something with advanced SQL string manipulation to short-circuit queries that contain +. SELECT result FROM table WHERE key = '%u@%d' AND key NOT

Re: About table search order: not to query 'user+extens...@domain.ltd'

2015-03-11 Thread Viktor Dukhovni
On Thu, Mar 12, 2015 at 12:07:49AM +0800, Zhang Huangbin wrote: An SQL server may well optimize that query away when the key contains a + and not do any disk I/O. In this case, SQL is flexible. but any solution for LDAP table? we cannot do this in ldap query filter. No. --

Re: About table search order: not to query 'user+extens...@domain.ltd'

2015-03-11 Thread Zhang Huangbin
On Wed, Mar 11, 2015 at 11:46 PM, Viktor Dukhovni postfix-us...@dukhovni.org wrote: Not at present. You can only suppress lookups for bare keys which can happen when the domain is $myorigin or matches $mydestination by interpolating the lookup key into the query via '%u@%d' instead of '%s'.

About table search order: not to query 'user+extens...@domain.ltd'

2015-03-11 Thread Zhang Huangbin
Dear all, According to Postfix document, virtual(8), 'user+extens...@domain.ltd' is looked up first, then 'u...@domain.ltd'. Is it possible to skip/ignore the address extension and just query 'u...@domain.ltd'? (by the way, i want to ignore the extension in SQL/LDAP lookup.) Thanks for your time