Skip to content

Commit 6cdefbd

Browse files
author
Marius Burkard
committed
Update mysql-virtual_forwardings.cf.master
1 parent b93c35f commit 6cdefbd

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed
Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
user = {mysql_server_ispconfig_user}
22
password = {mysql_server_ispconfig_password}
33
dbname = {mysql_server_database}
4-
table = mail_forwarding
5-
select_field = destination
6-
where_field = source
7-
# additional_conditions = and type != 'aliasdomain' and active = 'y' and server_id = {server_id}
8-
additional_conditions = and active = 'y' and server_id = {server_id}
9-
hosts = {mysql_server_ip}
4+
hosts = {mysql_server_ip}
5+
query = SELECT u.email as target FROM mail_forwarding as s INNER JOIN mail_user as u ON (u.email = CONCAT('%u@', SUBSTRING_INDEX(s.destination,'@',-1))) WHERE s.source = '@%d' AND s.type = 'aliasdomain' AND s.active = 'y' AND u.disabledeliver = 'n' AND s.server_id = {server_id} UNION SELECT s.destination as target FROM mail_forwarding as s WHERE s.source = '%s' AND s.type IN ('alias', 'forward') and s.active = 'y' AND s.server_id = {server_id} UNION SELECT s.destination as target FROM mail_forwarding as s INNER JOIN mail_forwarding as f ON (f.source = CONCAT('%u@', SUBSTRING_INDEX(s.destination,'@',-1))) WHERE s.source = '@%d' AND s.type = 'aliasdomain' AND s.active = 'y' AND f.active = 'y' AND s.server_id = {server_id} UNION SELECT s.destination as target FROM mail_forwarding as s WHERE s.source = '@%d' AND s.type IN ('catchall') and s.active = 'y' AND s.server_id = {server_id} UNION SELECT s.destination as target FROM mail_forwarding as s INNER JOIN mail_forwarding as t ON (t.source = s.destination AND t.type = 'catchall') WHERE s.source = '@%d' AND s.type = 'aliasdomain' and s.active = 'y' AND t.active = 'y' AND s.server_id = {server_id}

0 commit comments

Comments
 (0)