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