You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: install/tpl/mysql-virtual_forwardings.cf.master
+19-1Lines changed: 19 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -2,4 +2,22 @@ user = {mysql_server_ispconfig_user}
2
2
password = {mysql_server_ispconfig_password}
3
3
dbname = {mysql_server_database}
4
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}
5
+
query = SELECT u.email as target FROM mail_forwarding as s
6
+
INNER JOIN mail_user as u ON (u.email = CONCAT('%u@', SUBSTRING_INDEX(s.destination,'@',-1)))
7
+
WHERE s.source = '@%d' AND s.type = 'aliasdomain' AND s.active = 'y' AND u.disabledeliver = 'n' AND s.server_id = {server_id}
8
+
UNION
9
+
SELECT s.destination as target FROM mail_forwarding as s
10
+
WHERE s.source = '%s' AND s.type IN ('alias', 'forward') and s.active = 'y' AND s.server_id = {server_id}
11
+
UNION
12
+
SELECT s.destination as target FROM mail_forwarding as s
13
+
INNER JOIN mail_forwarding as f ON (f.source = CONCAT('%u@', SUBSTRING_INDEX(s.destination,'@',-1)))
14
+
WHERE s.source = '@%d' AND s.type = 'aliasdomain' AND s.active = 'y' AND f.active = 'y' AND s.server_id = {server_id}
15
+
UNION
16
+
SELECT s.destination as target FROM mail_forwarding as s
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}
20
+
UNION
21
+
SELECT s.destination as target FROM mail_forwarding as s
22
+
INNER JOIN mail_forwarding as t ON (t.source = s.destination AND t.type = 'catchall')
23
+
WHERE s.source = '@%d' AND s.type = 'aliasdomain' and s.active = 'y' AND t.active = 'y' AND s.server_id = {server_id}
additional_conditions = and postfix = 'y' and server_id = {server_id}
8
4
hosts = {mysql_server_ip}
5
+
query = select CONCAT(SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1),'/') from mail_user where login = '%s' and postfix = 'y' and server_id = {server_id}
Copy file name to clipboardExpand all lines: install/tpl/mysql-virtual_policy_greylist.cf.master
+8-5Lines changed: 8 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,13 @@
1
1
user = {mysql_server_ispconfig_user}
2
2
password = {mysql_server_ispconfig_password}
3
3
dbname = {mysql_server_database}
4
+
hosts = {mysql_server_ip}
4
5
query = SELECT 'greylisting' FROM
5
-
(SELECT `greylisting`, 1 as `prio` FROM `mail_user` WHERE `server_id` = {server_id} AND `email` = '%s'
6
-
UNION SELECT `greylisting`, 2 as `prio` FROM `mail_forwarding` WHERE `server_id` = {server_id} AND `source` = '%s'
7
-
UNION SELECT `greylisting`, 3 as `prio` FROM `mail_forwarding` WHERE `server_id` = {server_id} AND `source` = '@%d' ORDER BY `prio` ASC LIMIT 1) as rules
6
+
(
7
+
SELECT `greylisting`, 1 as `prio` FROM `mail_user` WHERE `server_id` = {server_id} AND `email` = '%s'
8
+
UNION
9
+
SELECT `greylisting`, 2 as `prio` FROM `mail_forwarding` WHERE `server_id` = {server_id} AND `source` = '%s'
10
+
UNION
11
+
SELECT `greylisting`, 3 as `prio` FROM `mail_forwarding` WHERE `server_id` = {server_id} AND `source` = '@%d' ORDER BY `prio` ASC LIMIT 1
0 commit comments