Forward to static aliases before wildcards, related to #38

master
Pierre Jaury 8 years ago
parent 0371da6307
commit 065e95723b

@ -2,10 +2,16 @@ 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
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…
Cancel
Save