You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
423 B
CFEngine3
22 lines
423 B
CFEngine3
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
|