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 = 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 (
alias.wildcard = 1
AND
'%s' LIKE alias.email
)
ORDER BY
alias.wildcard ASC
LIMIT 1 LIMIT 1

Loading…
Cancel
Save