From 63e63f6838d2e516618e20b1e1a5b12766234b07 Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Sat, 11 Aug 2007 15:37:44 +0000
Subject: [PATCH] Added server_id variable to postfix config file templates.

---
 install/tpl/mysql-virtual_domains.cf.master     | 1 +
 install/tpl/mysql-virtual_email2email.cf.master | 1 +
 install/tpl/mysql-virtual_forwardings.cf.master | 2 +-
 install/tpl/mysql-virtual_mailboxes.cf.master   | 2 +-
 install/tpl/mysql-virtual_recipient.cf.master   | 2 +-
 install/tpl/mysql-virtual_sender.cf.master      | 2 +-
 install/tpl/mysql-virtual_transports.cf.master  | 2 +-
 7 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/install/tpl/mysql-virtual_domains.cf.master b/install/tpl/mysql-virtual_domains.cf.master
index 8cb0d18f95..a02febc5e2 100644
--- a/install/tpl/mysql-virtual_domains.cf.master
+++ b/install/tpl/mysql-virtual_domains.cf.master
@@ -4,4 +4,5 @@ dbname = {mysql_server_database}
 table = mail_domain
 select_field = 'virtual'
 where_field = domain
+additional_conditions = and server_id = {server_id}
 hosts = {mysql_server_ip}
\ No newline at end of file
diff --git a/install/tpl/mysql-virtual_email2email.cf.master b/install/tpl/mysql-virtual_email2email.cf.master
index df3be04763..db73a62868 100644
--- a/install/tpl/mysql-virtual_email2email.cf.master
+++ b/install/tpl/mysql-virtual_email2email.cf.master
@@ -4,4 +4,5 @@ dbname = {mysql_server_database}
 table = mail_user
 select_field = email
 where_field = email
+additional_conditions = and server_id = {server_id}
 hosts = {mysql_server_ip}
\ No newline at end of file
diff --git a/install/tpl/mysql-virtual_forwardings.cf.master b/install/tpl/mysql-virtual_forwardings.cf.master
index 01281e353c..b3f3325bae 100644
--- a/install/tpl/mysql-virtual_forwardings.cf.master
+++ b/install/tpl/mysql-virtual_forwardings.cf.master
@@ -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
diff --git a/install/tpl/mysql-virtual_mailboxes.cf.master b/install/tpl/mysql-virtual_mailboxes.cf.master
index 570f069e25..d013c34cdc 100644
--- a/install/tpl/mysql-virtual_mailboxes.cf.master
+++ b/install/tpl/mysql-virtual_mailboxes.cf.master
@@ -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
diff --git a/install/tpl/mysql-virtual_recipient.cf.master b/install/tpl/mysql-virtual_recipient.cf.master
index 254cfe5cbf..49024f3ebd 100644
--- a/install/tpl/mysql-virtual_recipient.cf.master
+++ b/install/tpl/mysql-virtual_recipient.cf.master
@@ -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
diff --git a/install/tpl/mysql-virtual_sender.cf.master b/install/tpl/mysql-virtual_sender.cf.master
index 7531451277..0ef634aec7 100644
--- a/install/tpl/mysql-virtual_sender.cf.master
+++ b/install/tpl/mysql-virtual_sender.cf.master
@@ -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
diff --git a/install/tpl/mysql-virtual_transports.cf.master b/install/tpl/mysql-virtual_transports.cf.master
index 0040d1d4ed..048a7a81ac 100644
--- a/install/tpl/mysql-virtual_transports.cf.master
+++ b/install/tpl/mysql-virtual_transports.cf.master
@@ -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
-- 
GitLab