1
0
mirror of https://github.com/Mailu/Mailu.git synced 2024-12-14 10:53:30 +02:00
Mailu/postfix/conf/sqlite-virtual_alias_maps.cf

22 lines
423 B
CFEngine3
Raw Normal View History

2016-02-17 23:56:40 +02:00
dbpath = /data/freeposte.db
query =
SELECT destination
FROM
(SELECT destination, email, wildcard, localpart FROM alias
UNION
SELECT email AS destination, email, 0 as wildcard, localpart FROM user)
WHERE
(
wildcard = 0
AND
email = '%s'
) OR (
wildcard = 1
AND
'%s' LIKE email
)
ORDER BY
wildcard ASC,
length(localpart) DESC
LIMIT 1