Implement the postfix part of domain aliasing

master
kaiyou 7 years ago
parent 2631de8977
commit 64ded60b5e

@ -4,7 +4,9 @@ query =
FROM
(SELECT destination, email, wildcard, localpart FROM alias
UNION
SELECT (CASE WHEN forward_enabled=1 THEN (CASE WHEN forward_keep=1 THEN email||',' ELSE '' END)||forward_destination ELSE email END) AS destination, email, 0 as wildcard, localpart FROM user)
SELECT (CASE WHEN forward_enabled=1 THEN (CASE WHEN forward_keep=1 THEN email||',' ELSE '' END)||forward_destination ELSE email END) AS destination, email, 0 as wildcard, localpart FROM user
UNION
SELECT '@'||domain_name as destination, '@'||name as email, 0 as wildcard, '' as localpart FROM alternative)
WHERE
(
wildcard = 0

@ -1,2 +1,5 @@
dbpath = /data/main.db
query = SELECT name FROM domain WHERE name='%s'
query =
SELECT name FROM domain WHERE name='%s'
UNION
SELECT name FROM alternative WHERE name='%s'

Loading…
Cancel
Save