diff --git a/install/dist/lib/fedora.lib.php b/install/dist/lib/fedora.lib.php index 0cf2141f72ad6c4c478ab8c1fc4982386591ce75..c188ac93a5b32727d28b26e8709621e10193b77e 100644 --- a/install/dist/lib/fedora.lib.php +++ b/install/dist/lib/fedora.lib.php @@ -66,6 +66,9 @@ class installer_dist extends installer_base { //* mysql-virtual_alias_domains.cf $this->process_postfix_config('mysql-virtual_alias_domains.cf'); + //* mysql-virtual_alias_maps.cf + $this->process_postfix_config('mysql-virtual_alias_maps.cf'); + //* mysql-virtual_mailboxes.cf $this->process_postfix_config('mysql-virtual_mailboxes.cf'); diff --git a/install/dist/lib/opensuse.lib.php b/install/dist/lib/opensuse.lib.php index 1401614c3fd2b4c1dc3a8b6ddf687c50638fc342..da31ad6b571d204836e6b9c5ea878c70ab2ecbb5 100644 --- a/install/dist/lib/opensuse.lib.php +++ b/install/dist/lib/opensuse.lib.php @@ -66,6 +66,9 @@ class installer_dist extends installer_base { //* mysql-virtual_alias_domains.cf $this->process_postfix_config('mysql-virtual_alias_domains.cf'); + //* mysql-virtual_alias_maps.cf + $this->process_postfix_config('mysql-virtual_alias_maps.cf'); + //* mysql-virtual_mailboxes.cf $this->process_postfix_config('mysql-virtual_mailboxes.cf'); diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index 10533dd66f9bed87df51632425cf988649aaa8d5..6a4d771e16b184ac23af5d3335d436c98176856a 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -976,6 +976,9 @@ class installer_base { //* mysql-virtual_alias_domains.cf $this->process_postfix_config('mysql-virtual_alias_domains.cf'); + //* mysql-virtual_alias_maps.cf + $this->process_postfix_config('mysql-virtual_alias_maps.cf'); + //* mysql-virtual_mailboxes.cf $this->process_postfix_config('mysql-virtual_mailboxes.cf'); diff --git a/install/tpl/debian_postfix.conf.master b/install/tpl/debian_postfix.conf.master index 169826747d01281c3de5838cc869004fc32e68aa..1c1b8187b1c1e62f4355b53545dadf7bd281863b 100644 --- a/install/tpl/debian_postfix.conf.master +++ b/install/tpl/debian_postfix.conf.master @@ -1,7 +1,7 @@ alias_maps = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases alias_database = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases virtual_alias_domains = proxy:mysql:{config_dir}/mysql-virtual_alias_domains.cf -virtual_alias_maps = hash:/var/lib/mailman/data/virtual-mailman, proxy:mysql:{config_dir}/mysql-virtual_forwardings.cf, proxy:mysql:{config_dir}/mysql-virtual_alias_domains.cf, proxy:mysql:{config_dir}/mysql-virtual_email2email.cf +virtual_alias_maps = hash:/var/lib/mailman/data/virtual-mailman, proxy:mysql:{config_dir}/mysql-virtual_forwardings.cf, proxy:mysql:{config_dir}/mysql-virtual_alias_maps.cf, proxy:mysql:{config_dir}/mysql-virtual_email2email.cf virtual_mailbox_domains = proxy:mysql:{config_dir}/mysql-virtual_domains.cf virtual_mailbox_maps = proxy:mysql:{config_dir}/mysql-virtual_mailboxes.cf virtual_mailbox_base = {vmail_mailbox_base} diff --git a/install/tpl/fedora_postfix.conf.master b/install/tpl/fedora_postfix.conf.master index 1c78e858beb5475f21ee6b85c00785c423f878bb..58892ef82a5098f70e2d8ee2a08a9df473be8894 100644 --- a/install/tpl/fedora_postfix.conf.master +++ b/install/tpl/fedora_postfix.conf.master @@ -1,5 +1,5 @@ virtual_alias_domains = proxy:mysql:{config_dir}/mysql-virtual_alias_domains.cf -virtual_alias_maps = hash:/var/lib/mailman/data/virtual-mailman, proxy:mysql:{config_dir}/mysql-virtual_forwardings.cf, proxy:mysql:{config_dir}/mysql-virtual_alias_domains.cf, proxy:mysql:{config_dir}/mysql-virtual_email2email.cf +virtual_alias_maps = hash:/var/lib/mailman/data/virtual-mailman, proxy:mysql:{config_dir}/mysql-virtual_forwardings.cf, proxy:mysql:{config_dir}/mysql-virtual_alias_maps.cf, proxy:mysql:{config_dir}/mysql-virtual_email2email.cf virtual_mailbox_domains = proxy:mysql:{config_dir}/mysql-virtual_domains.cf virtual_mailbox_maps = proxy:mysql:{config_dir}/mysql-virtual_mailboxes.cf virtual_mailbox_base = {vmail_mailbox_base} diff --git a/install/tpl/gentoo_postfix.conf.master b/install/tpl/gentoo_postfix.conf.master index 84d404d15b0bc63e4b5edb469c04f478b3070018..c38670f25012d090b0c624816bdfdab5debb9113 100644 --- a/install/tpl/gentoo_postfix.conf.master +++ b/install/tpl/gentoo_postfix.conf.master @@ -1,5 +1,5 @@ virtual_alias_domains = proxy:mysql:{config_dir}/mysql-virtual_alias_domains.cf -virtual_alias_maps = hash:/var/lib/mailman/data/virtual-mailman, proxy:mysql:{config_dir}/mysql-virtual_forwardings.cf, proxy:mysql:{config_dir}/mysql-virtual_alias_domains.cf, proxy:mysql:{config_dir}/mysql-virtual_email2email.cf +virtual_alias_maps = hash:/var/lib/mailman/data/virtual-mailman, proxy:mysql:{config_dir}/mysql-virtual_forwardings.cf, proxy:mysql:{config_dir}/mysql-virtual_alias_maps.cf, proxy:mysql:{config_dir}/mysql-virtual_email2email.cf virtual_mailbox_domains = proxy:mysql:{config_dir}/mysql-virtual_domains.cf virtual_mailbox_maps = proxy:mysql:{config_dir}/mysql-virtual_mailboxes.cf virtual_mailbox_base = {vmail_mailbox_base} diff --git a/install/tpl/mysql-virtual_alias_domains.cf.master b/install/tpl/mysql-virtual_alias_domains.cf.master index e55fd8ea8df088457ba43a01c8df62a33e888b6f..26b14ac00da538ba9253fe937cb6a4f79bec5942 100644 --- a/install/tpl/mysql-virtual_alias_domains.cf.master +++ b/install/tpl/mysql-virtual_alias_domains.cf.master @@ -2,5 +2,6 @@ user = {mysql_server_ispconfig_user} password = {mysql_server_ispconfig_password} dbname = {mysql_server_database} hosts = {mysql_server_ip} -query = SELECT destination FROM mail_forwarding - WHERE source = '@%d' AND type = 'aliasdomain' AND active = 'y' AND server_id = {server_id} +query = SELECT SUBSTRING_INDEX(destination, '@', -1) FROM mail_forwarding + WHERE source = '@%s' AND type = 'aliasdomain' AND active = 'y' AND server_id = {server_id} + diff --git a/install/tpl/mysql-virtual_alias_maps.cf.master b/install/tpl/mysql-virtual_alias_maps.cf.master new file mode 100644 index 0000000000000000000000000000000000000000..e55fd8ea8df088457ba43a01c8df62a33e888b6f --- /dev/null +++ b/install/tpl/mysql-virtual_alias_maps.cf.master @@ -0,0 +1,6 @@ +user = {mysql_server_ispconfig_user} +password = {mysql_server_ispconfig_password} +dbname = {mysql_server_database} +hosts = {mysql_server_ip} +query = SELECT destination FROM mail_forwarding + WHERE source = '@%d' AND type = 'aliasdomain' AND active = 'y' AND server_id = {server_id} diff --git a/install/tpl/opensuse_postfix.conf.master b/install/tpl/opensuse_postfix.conf.master index f2d2a4403b4cc89f79626789b779ae7c3e6d1ab9..d254e3ccb5ad94a312cd48ac6759d1ca4932994c 100644 --- a/install/tpl/opensuse_postfix.conf.master +++ b/install/tpl/opensuse_postfix.conf.master @@ -1,7 +1,7 @@ alias_maps = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases alias_database = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases virtual_alias_domains = proxy:mysql:{config_dir}/mysql-virtual_alias_domains.cf -virtual_alias_maps = hash:/var/lib/mailman/data/virtual-mailman, proxy:mysql:{config_dir}/mysql-virtual_forwardings.cf, proxy:mysql:{config_dir}/mysql-virtual_alias_domains.cf, proxy:mysql:{config_dir}/mysql-virtual_email2email.cf +virtual_alias_maps = hash:/var/lib/mailman/data/virtual-mailman, proxy:mysql:{config_dir}/mysql-virtual_forwardings.cf, proxy:mysql:{config_dir}/mysql-virtual_alias_maps.cf, proxy:mysql:{config_dir}/mysql-virtual_email2email.cf virtual_mailbox_domains = proxy:mysql:{config_dir}/mysql-virtual_domains.cf virtual_mailbox_maps = proxy:mysql:{config_dir}/mysql-virtual_mailboxes.cf virtual_mailbox_base = {vmail_mailbox_base}