Re: virtualdomains recipient_delimiter and catch-all troubles

2015-08-08 Thread Viktor Dukhovni
On Sat, Aug 08, 2015 at 11:13:46PM +0200, Palica wrote: > I have figured it out! > > This is the changed query: > > query = SELECT alias FROM (SELECT alias, 0 as priority FROM alias WHERE > address='%s' AND active='1' UNION SELECT username as destination, 1 as > priority FROM mailbox WHERE usern

Re: virtualdomains recipient_delimiter and catch-all troubles

2015-08-08 Thread Palica
I have figured it out! This is the changed query: query = SELECT alias FROM (SELECT alias, 0 as priority FROM alias WHERE address='%s' AND active='1' UNION SELECT username as destination, 1 as priority FROM mailbox WHERE username='%s' AND active='1') ORDER BY priority LIMIT 1; Thanks Palic