Skip to content

Commit e5a00f9

Browse files
committed
update mysql-virtual_forwardings.cf.master
1 parent f8cc822 commit e5a00f9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

install/tpl/mysql-virtual_forwardings.cf.master

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ query = SELECT u.email as target FROM mail_forwarding as s
1414
WHERE s.source = '@%d' AND s.type = 'aliasdomain' AND s.active = 'y' AND f.active = 'y' AND s.server_id = {server_id}
1515
UNION
1616
SELECT s.destination as target FROM mail_forwarding as s
17-
WHERE s.source = '@%d' AND s.type IN ('catchall') and s.active = 'y' AND s.server_id = {server_id}
17+
LEFT JOIN mail_user as uu ON (uu.email = '%s' AND uu.disabledeliver = 'n')
18+
LEFT JOIN mail_forwarding as uf ON (uf.source = '%s' AND uf.type IN ('alias', 'forward') AND uf.active = 'y')
19+
WHERE s.source = '@%d' AND s.type IN ('catchall') and s.active = 'y' AND uu.mailuser_id IS NULL AND uf.forwarding_id IS NULL AND s.server_id = {server_id}
1820
UNION
1921
SELECT s.destination as target FROM mail_forwarding as s
2022
INNER JOIN mail_forwarding as t ON (t.source = s.destination AND t.type = 'catchall')

0 commit comments

Comments
 (0)