Skip to content
Snippets Groups Projects
Commit 449be61e authored by Till Brehm's avatar Till Brehm
Browse files

Merge branch '2722-error-in-mysql-virtual_forwardings-cf' into 'stable-3.1'

Resolve "error in mysql-virtual_forwardings.cf"

See merge request ispconfig/ispconfig3!1043
parents b93c35f2 6cdefbd9
No related branches found
No related tags found
No related merge requests found
user = {mysql_server_ispconfig_user}
password = {mysql_server_ispconfig_password}
dbname = {mysql_server_database}
table = mail_forwarding
select_field = destination
where_field = source
# additional_conditions = and type != 'aliasdomain' and active = 'y' and server_id = {server_id}
additional_conditions = and active = 'y' and server_id = {server_id}
hosts = {mysql_server_ip}
\ No newline at end of file
hosts = {mysql_server_ip}
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% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment