Skip to content

Commit 0873be2

Browse files
author
Marius Burkard
committed
Merge branch 'stable-3.1'
2 parents aa82ec9 + cf4d791 commit 0873be2

File tree

8 files changed

+56
-48
lines changed

8 files changed

+56
-48
lines changed

install/dist/lib/fedora.lib.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -103,17 +103,17 @@ function configure_postfix($options = '')
103103
$this->process_postfix_config('mysql-virtual_uids.cf');
104104

105105
//* postfix-dkim
106-
$full_file_name=$config_dir.'/tag_as_originating.re';
107-
if(is_file($full_file_name)) {
108-
copy($full_file_name, $config_dir.$configfile.'~');
109-
}
110-
wf($full_file_name, '/^/ FILTER amavis:[127.0.0.1]:10026');
111-
112-
$full_file_name=$config_dir.'/tag_as_foreign.re';
113-
if(is_file($full_file_name)) {
114-
copy($full_file_name, $config_dir.$configfile.'~');
115-
}
116-
wf($full_file_name, '/^/ FILTER amavis:[127.0.0.1]:10024');
106+
$filename='tag_as_originating.re';
107+
$full_file_name=$config_dir.'/'.$filename;
108+
if(is_file($full_file_name)) copy($full_file_name, $full_file_name.'~');
109+
$content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/postfix-'.$filename.'.master', 'tpl/postfix-'.$filename.'.master');
110+
wf($full_file_name, $content);
111+
112+
$filename='tag_as_foreign.re';
113+
$full_file_name=$config_dir.'/'.$filename;
114+
if(is_file($full_file_name)) copy($full_file_name, $full_file_name.'~');
115+
$content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/postfix-'.$filename.'.master', 'tpl/postfix-'.$filename.'.master');
116+
wf($full_file_name, $content);
117117

118118
//* Changing mode and group of the new created config files.
119119
caselog('chmod o= '.$config_dir.'/mysql-virtual_*.cf* &> /dev/null',

install/dist/lib/gentoo.lib.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -212,17 +212,17 @@ public function configure_postfix($options = '')
212212
}
213213

214214
//* postfix-dkim
215-
$full_file_name=$config_dir.'/tag_as_originating.re';
216-
if(is_file($full_file_name)) {
217-
copy($full_file_name, $config_dir.$configfile.'~');
218-
}
219-
$this->write_config_file($full_file_name, '/^/ FILTER amavis:[127.0.0.1]:10026');
220-
221-
$full_file_name=$config_dir.'/tag_as_foreign.re';
222-
if(is_file($full_file_name)) {
223-
copy($full_file_name, $config_dir.$configfile.'~');
224-
}
225-
$this->write_config_file($full_file_name, '/^/ FILTER amavis:[127.0.0.1]:10024');
215+
$filename='tag_as_originating.re';
216+
$full_file_name=$config_dir.'/'.$filename;
217+
if(is_file($full_file_name)) copy($full_file_name, $full_file_name.'~');
218+
$content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/postfix-'.$filename.'.master', 'tpl/postfix-'.$filename.'.master');
219+
wf($full_file_name, $content);
220+
221+
$filename='tag_as_foreign.re';
222+
$full_file_name=$config_dir.'/'.$filename;
223+
if(is_file($full_file_name)) copy($full_file_name, $full_file_name.'~');
224+
$content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/postfix-'.$filename.'.master', 'tpl/postfix-'.$filename.'.master');
225+
wf($full_file_name, $content);
226226

227227
//* Chmod and chown the .mailfilter file
228228
$command = 'chown -R '.$cf['vmail_username'].':'.$cf['vmail_groupname'].' '.$cf['vmail_mailbox_base'].'/.mailfilter';

install/dist/lib/opensuse.lib.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -100,17 +100,17 @@ function configure_postfix($options = '')
100100
$this->process_postfix_config('mysql-virtual_uids.cf');
101101

102102
//* postfix-dkim
103-
$full_file_name=$config_dir.'/tag_as_originating.re';
104-
if(is_file($full_file_name)) {
105-
copy($full_file_name, $config_dir.$configfile.'~');
106-
}
107-
wf($full_file_name, '/^/ FILTER amavis:[127.0.0.1]:10026');
108-
109-
$full_file_name=$config_dir.'/tag_as_foreign.re';
110-
if(is_file($full_file_name)) {
111-
copy($full_file_name, $config_dir.$configfile.'~');
112-
}
113-
wf($full_file_name, '/^/ FILTER amavis:[127.0.0.1]:10024');
103+
$filename='tag_as_originating.re';
104+
$full_file_name=$config_dir.'/'.$filename;
105+
if(is_file($full_file_name)) copy($full_file_name, $full_file_name.'~');
106+
$content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/postfix-'.$filename.'.master', 'tpl/postfix-'.$filename.'.master');
107+
wf($full_file_name, $content);
108+
109+
$filename='tag_as_foreign.re';
110+
$full_file_name=$config_dir.'/'.$filename;
111+
if(is_file($full_file_name)) copy($full_file_name, $full_file_name.'~');
112+
$content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/postfix-'.$filename.'.master', 'tpl/postfix-'.$filename.'.master');
113+
wf($full_file_name, $content);
114114

115115
//* Changing mode and group of the new created config files.
116116
caselog('chmod o= '.$config_dir.'/mysql-virtual_*.cf* &> /dev/null',

install/lib/installer_base.lib.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -987,13 +987,17 @@ public function configure_postfix($options = '') {
987987
$this->process_postfix_config('mysql-virtual_uids.cf');
988988

989989
//* postfix-dkim
990-
$full_file_name=$config_dir.'/tag_as_originating.re';
990+
$filename='tag_as_originating.re';
991+
$full_file_name=$config_dir.'/'.$filename;
991992
if(is_file($full_file_name)) copy($full_file_name, $full_file_name.'~');
992-
wf($full_file_name, '/^/ FILTER amavis:[127.0.0.1]:10026');
993+
$content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/postfix-'.$filename.'.master', 'tpl/postfix-'.$filename.'.master');
994+
wf($full_file_name, $content);
993995

994-
$full_file_name=$config_dir.'/tag_as_foreign.re';
996+
$filename='tag_as_foreign.re';
997+
$full_file_name=$config_dir.'/'.$filename;
995998
if(is_file($full_file_name)) copy($full_file_name, $full_file_name.'~');
996-
wf($full_file_name, '/^/ FILTER amavis:[127.0.0.1]:10024');
999+
$content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/postfix-'.$filename.'.master', 'tpl/postfix-'.$filename.'.master');
1000+
wf($full_file_name, $content);
9971001

9981002
//* Changing mode and group of the new created config files.
9991003
caselog('chmod u=rw,g=r,o= '.$config_dir.'/mysql-virtual_*.cf* &> /dev/null',
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/^/ FILTER amavis:[127.0.0.1]:10024
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/^/ FILTER amavis:[127.0.0.1]:10026

interface/web/admin/server_edit.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ function onShowEnd() {
5555
global $app, $conf;
5656

5757
// Getting Servers
58-
$sql = "SELECT server_id,server_name FROM server WHERE server_id != ? ORDER BY server_name";
59-
$mirror_servers = $app->db->queryAllRecords($sql, $this->id);
58+
$sql = "SELECT server_id,server_name FROM server WHERE server_id != ? AND mirror_server_id != ? ORDER BY server_name";
59+
$mirror_servers = $app->db->queryAllRecords($sql, $this->id, $this->id);
6060
$mirror_server_select = '<option value="0">'.$app->tform->lng('- None -').'</option>';
6161
if(is_array($mirror_servers)) {
6262
foreach( $mirror_servers as $mirror_server) {
@@ -72,8 +72,8 @@ function onShowEnd() {
7272
function onSubmit() {
7373
global $app;
7474

75-
//* We do not want to mirror the the server itself
76-
if($this->id == $this->dataRecord['mirror_server_id']) $this->dataRecord['mirror_server_id'] = 0;
75+
//* We do not want to mirror the the server itself and the master can not be a mirror
76+
if($this->id == $this->dataRecord['mirror_server_id'] || $this->id == 1) $this->dataRecord['mirror_server_id'] = 0;
7777

7878
parent::onSubmit();
7979

interface/web/admin/templates/server_edit_services.htm

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,14 @@ <h1><tmpl_var name="list_head_txt"></h1>
5050
{tmpl_var name='xmpp_server'}
5151
</div>
5252
</div>
53-
<div class="form-group">
54-
<label for="mirror_server_id" class="col-sm-3 control-label">{tmpl_var name='mirror_server_id_txt'}</label>
55-
<div class="col-sm-9"><select name="mirror_server_id" id="server_id" class="form-control">
56-
{tmpl_var name='mirror_server_id'}
57-
</select></div>
58-
</div>
53+
<tmpl_if name="id" op="!=" value="1">
54+
<div class="form-group">
55+
<label for="mirror_server_id" class="col-sm-3 control-label">{tmpl_var name='mirror_server_id_txt'}</label>
56+
<div class="col-sm-9"><select name="mirror_server_id" id="server_id" class="form-control">
57+
{tmpl_var name='mirror_server_id'}
58+
</select></div>
59+
</div>
60+
</tmpl_if>
5961
<div class="form-group">
6062
<label for="active" class="col-sm-3 control-label">{tmpl_var name='active_txt'}</label>
6163
<div class="col-sm-9"><select name="active" id="active" class="form-control">
@@ -69,4 +71,4 @@ <h1><tmpl_var name="list_head_txt"></h1>
6971
<div class="clear"><div class="right">
7072
<button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" data-submit-form="pageForm" data-form-action="admin/server_edit.php">{tmpl_var name='btn_save_txt'}</button>
7173
<button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="admin/server_list.php">{tmpl_var name='btn_cancel_txt'}</button>
72-
</div></div>
74+
</div></div>

0 commit comments

Comments
 (0)