Forward to static aliases before wildcards, related to #38
parent
0371da6307
commit
065e95723b
@ -1,11 +1,17 @@
|
|||||||
dbpath = /data/freeposte.db
|
dbpath = /data/freeposte.db
|
||||||
query =
|
query =
|
||||||
SELECT destination
|
SELECT destination
|
||||||
FROM alias
|
FROM alias
|
||||||
WHERE alias.email = '%s'
|
WHERE
|
||||||
AND alias.wildcard = 0
|
(
|
||||||
UNION SELECT destination
|
alias.wildcard = 0
|
||||||
FROM alias
|
AND
|
||||||
WHERE '%s' LIKE alias.email
|
alias.email = '%s'
|
||||||
AND alias.wildcard = 1
|
) OR (
|
||||||
LIMIT 1
|
alias.wildcard = 1
|
||||||
|
AND
|
||||||
|
'%s' LIKE alias.email
|
||||||
|
)
|
||||||
|
ORDER BY
|
||||||
|
alias.wildcard ASC
|
||||||
|
LIMIT 1
|
||||||
|
Loading…
Reference in New Issue