Commit 5619c7dd authored by tbrehm's avatar tbrehm

Fixed: FS#1229 - ISPConfig3 creates the desired e-mail domain twice (on master...

Fixed: FS#1229 - ISPConfig3 creates the desired e-mail domain twice (on master server AND on the selected Slave) 
parent efbdeaec
......@@ -4,5 +4,5 @@ dbname = {mysql_server_database}
table = mail_domain
select_field = domain
where_field = domain
additional_conditions = and active = 'y'
additional_conditions = and active = 'y' and server_id = {server_id}
hosts = {mysql_server_ip}
\ No newline at end of file
......@@ -4,5 +4,5 @@ dbname = {mysql_server_database}
table = mail_user
select_field = email
where_field = email
additional_conditions = and postfix = 'y'
additional_conditions = and postfix = 'y' and server_id = {server_id}
hosts = {mysql_server_ip}
\ No newline at end of file
......@@ -4,5 +4,5 @@ dbname = {mysql_server_database}
table = mail_forwarding
select_field = destination
where_field = source
additional_conditions = and active = 'y'
additional_conditions = and active = 'y' and server_id = {server_id}
hosts = {mysql_server_ip}
\ No newline at end of file
......@@ -4,5 +4,5 @@ dbname = {mysql_server_database}
table = mail_user
select_field = CONCAT(SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1),'/')
where_field = email
additional_conditions = and postfix = 'y'
additional_conditions = and postfix = 'y' and server_id = {server_id}
hosts = {mysql_server_ip}
\ No newline at end of file
......@@ -4,5 +4,5 @@ dbname = {mysql_server_database}
table = mail_access
select_field = access
where_field = source
additional_conditions = and type = 'recipient' and active = 'y'
additional_conditions = and type = 'recipient' and active = 'y' and server_id = {server_id}
hosts = {mysql_server_ip}
\ No newline at end of file
......@@ -4,5 +4,5 @@ dbname = {mysql_server_database}
table = mail_transport
select_field = domain
where_field = domain
additional_conditions = and active = 'y'
additional_conditions = and active = 'y' and server_id = {server_id}
hosts = {mysql_server_ip}
\ No newline at end of file
......@@ -4,5 +4,5 @@ dbname = {mysql_server_database}
table = mail_relay_recipient
select_field = access
where_field = source
additional_conditions = and active = 'y'
additional_conditions = and active = 'y' and server_id = {server_id}
hosts = {mysql_server_ip}
\ No newline at end of file
......@@ -4,5 +4,5 @@ dbname = {mysql_server_database}
table = mail_access
select_field = access
where_field = source
additional_conditions = and type = 'sender' and active = 'y'
additional_conditions = and type = 'sender' and active = 'y' and server_id = {server_id}
hosts = {mysql_server_ip}
\ No newline at end of file
......@@ -4,5 +4,5 @@ dbname = {mysql_server_database}
table = mail_transport
select_field = transport
where_field = domain
additional_conditions = and active = 'y'
additional_conditions = and active = 'y' and server_id = {server_id}
hosts = {mysql_server_ip}
\ No newline at end of file
......@@ -109,6 +109,15 @@ class modules {
$this->current_datalog_id = $d["datalog_id"];
/*
* If we are in a mirror setup, rewrite the server_id of records that originally
* belonged to the mirrored server to the local server_id
*/
if($conf["mirror_server_id"] > 0 && $d['dbtable'] != 'server') {
if(isset($data['new']['server_id']) && $data['new']['server_id'] == $conf["mirror_server_id"]) $data['new']['server_id'] = $conf["server_id"];
if(isset($data['old']['server_id']) && $data['old']['server_id'] == $conf["mirror_server_id"]) $data['old']['server_id'] = $conf["server_id"];
}
if(count($data['new']) > 0) {
if($d["action"] == 'i' || $d["action"] == 'u') {
$idx = explode(":",$d["dbidx"]);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment