Skip to content

Commit 4d9563e

Browse files
committed
Merge branch 'develop' of git.ispconfig.org:ispconfig/ispconfig3 into develop
2 parents 3fe4e0c + 3118c93 commit 4d9563e

16 files changed

+61
-30
lines changed

install/lib/installer_base.lib.php

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1175,6 +1175,12 @@ public function configure_postfix($options = '') {
11751175
$content = strtr($content, $postconf_placeholders);
11761176
$postconf_commands = array_merge($postconf_commands, array_filter(explode("\n", $content)));
11771177
}
1178+
$configfile = 'postfix_custom.conf';
1179+
if(file_exists($conf['ispconfig_install_dir'].'/server/conf-custom/install/' . $configfile . '.master')) {
1180+
$content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/'.$configfile.'.master');
1181+
$content = strtr($content, $postconf_placeholders);
1182+
$postconf_commands = array_merge($postconf_commands, array_filter(explode("\n", $content)));
1183+
}
11781184

11791185
// Remove comment lines, these would give fatal errors when passed to postconf.
11801186
$postconf_commands = array_filter($postconf_commands, function($line) { return preg_match('/^[^#]/', $line); });
@@ -1528,6 +1534,10 @@ public function configure_dovecot() {
15281534
} else {
15291535
copy('tpl/debian_dovecot2.conf.master', $config_dir.'/'.$configfile);
15301536
}
1537+
// Copy custom config file
1538+
if(is_file($conf['ispconfig_install_dir'].'/server/conf-custom/install/dovecot_custom.conf.master')) {
1539+
copy($conf['ispconfig_install_dir'].'/server/conf-custom/install/dovecot_custom.conf.master', $config_dir.'/conf.d/99-ispconfig-custom-config.conf');
1540+
}
15311541
replaceLine($config_dir.'/'.$configfile, 'postmaster_address = postmaster@example.com', 'postmaster_address = postmaster@'.$conf['hostname'], 1, 0);
15321542
replaceLine($config_dir.'/'.$configfile, 'postmaster_address = webmaster@localhost', 'postmaster_address = postmaster@'.$conf['hostname'], 1, 0);
15331543
if(version_compare($dovecot_version, 2.1, '<')) {
@@ -2546,7 +2556,7 @@ public function configure_apps_vhost() {
25462556
$tpl->setVar('apps_vhost_dir',$conf['web']['website_basedir'].'/apps');
25472557
$tpl->setVar('apps_vhost_basedir',$conf['web']['website_basedir']);
25482558
$tpl->setVar('apps_vhost_servername',$apps_vhost_servername);
2549-
if(is_file($install_dir.'/interface/ssl/ispserver.crt') && is_file($install_dir.'/interface/ssl/ispserver.key')) {
2559+
if(is_file($conf['ispconfig_install_dir'].'/interface/ssl/ispserver.crt') && is_file($conf['ispconfig_install_dir'].'/interface/ssl/ispserver.key')) {
25502560
$tpl->setVar('ssl_comment','');
25512561
} else {
25522562
$tpl->setVar('ssl_comment','#');
@@ -2629,6 +2639,15 @@ public function configure_apps_vhost() {
26292639
// Dont just copy over the virtualhost template but add some custom settings
26302640
$content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/nginx_apps.vhost.master', 'tpl/nginx_apps.vhost.master');
26312641

2642+
// Enable SSL if a cert is in place.
2643+
if(is_file($conf['ispconfig_install_dir'].'/interface/ssl/ispserver.crt') && is_file($conf['ispconfig_install_dir'].'/interface/ssl/ispserver.key')) {
2644+
$content = str_replace('{ssl_on}', 'ssl', $content);
2645+
$content = str_replace('{ssl_comment}', '', $content);
2646+
} else {
2647+
$content = str_replace('{ssl_on}', '', $content);
2648+
$content = str_replace('{ssl_comment}', '#', $content);
2649+
}
2650+
26322651
if($conf['web']['apps_vhost_ip'] == '_default_'){
26332652
$apps_vhost_ip = '';
26342653
} else {
@@ -2671,10 +2690,6 @@ public function configure_apps_vhost() {
26712690
$content = str_replace('{use_tcp}', $use_tcp, $content);
26722691
$content = str_replace('{use_socket}', $use_socket, $content);
26732692

2674-
// SSL in apps vhost is off by default. Might change later.
2675-
$content = str_replace('{ssl_on}', '', $content);
2676-
$content = str_replace('{ssl_comment}', '#', $content);
2677-
26782693
// Fix socket path on PHP 7 systems
26792694
if(file_exists('/var/run/php/php7.0-fpm.sock')) $content = str_replace('/var/run/php5-fpm.sock', '/var/run/php/php7.0-fpm.sock', $content);
26802695
if(file_exists('/var/run/php/php7.1-fpm.sock')) $content = str_replace('/var/run/php5-fpm.sock', '/var/run/php/php7.1-fpm.sock', $content);

install/tpl/debian6_dovecot2.conf.master

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Do not change this file, as changes will be overwritten by any ISPConfig update.
2+
# Put your custom settings in /usr/local/ispconfig/server/conf-custom/install/dovecot_custom.conf.master.
3+
# To start using those changes, do a force upgrade and let it reconfigure your services. (ispconfig_update.sh --force)
14
listen = *,[::]
25
protocols = imap pop3
36
auth_mechanisms = plain login
@@ -88,7 +91,7 @@ protocol lmtp {
8891
#2.3+ group = vmail
8992
#2.3+ mode = 0660
9093
#2.3+ }
91-
#2.3+
94+
#2.3+
9295
#2.3+ unix_listener stats-writer {
9396
#2.3+ user = vmail
9497
#2.3+ group = vmail
@@ -131,3 +134,4 @@ namespace inbox {
131134
special_use = \Trash
132135
}
133136
}
137+
!include_try conf.d/99-ispconfig-custom-config.conf

install/tpl/debian_dovecot2.conf.master

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Do not change this file, as changes will be overwritten by any ISPConfig update.
2+
# Put your custom settings in /usr/local/ispconfig/server/conf-custom/install/dovecot_custom.conf.master.
3+
# To start using those changes, do a force upgrade and let it reconfigure your services. (ispconfig_update.sh --force)
14
listen = *,[::]
25
protocols = imap pop3
36
auth_mechanisms = plain login
@@ -86,7 +89,7 @@ protocol lmtp {
8689
#2.3+ group = vmail
8790
#2.3+ mode = 0660
8891
#2.3+ }
89-
#2.3+
92+
#2.3+
9093
#2.3+ unix_listener stats-writer {
9194
#2.3+ user = vmail
9295
#2.3+ group = vmail
@@ -108,3 +111,4 @@ plugin {
108111
quota_status_nouser = DUNNO
109112
quota_status_overquota = "552 5.2.2 Mailbox is full"
110113
}
114+
!include_try conf.d/99-ispconfig-custom-config.conf
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# You can use this file for custom Dovecot settings. The used settings will overrule the settings set by ISPConfig.
2+
# Use with caution!
3+
# Put this file in /usr/local/ispconfig/server/conf-custom/install/ and make your changes there.

install/tpl/fedora_dovecot2.conf.master

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Do not change this file, as changes will be overwritten by any ISPConfig update.
2+
# Put your custom settings in /usr/local/ispconfig/server/conf-custom/install/dovecot_custom.conf.master.
3+
# To start using those changes, do a force upgrade and let it reconfigure your services. (ispconfig_update.sh --force)
14
listen = *,[::]
25
protocols = imap pop3
36
auth_mechanisms = plain login
@@ -82,7 +85,7 @@ protocol lmtp {
8285
#2.3+ group = vmail
8386
#2.3+ mode = 0660
8487
#2.3+ }
85-
#2.3+
88+
#2.3+
8689
#2.3+ unix_listener stats-writer {
8790
#2.3+ user = vmail
8891
#2.3+ group = vmail
@@ -125,3 +128,4 @@ namespace inbox {
125128
special_use = \Trash
126129
}
127130
}
131+
!include_try conf.d/99-ispconfig-custom-config.conf

install/tpl/nginx_apps.vhost.master

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
server {
2-
listen {apps_vhost_ip}{apps_vhost_port} {ssl_on};
3-
listen [::]:{apps_vhost_port} {ssl_on} ipv6only=on;
2+
listen {apps_vhost_ip}{apps_vhost_port} {ssl_on} http2;
3+
listen [::]:{apps_vhost_port} {ssl_on} ipv6only=on http2;
44

55
{ssl_comment}ssl_protocols TLSv1.2;
66
{ssl_comment}ssl_certificate /usr/local/ispconfig/interface/ssl/ispserver.crt;
77
{ssl_comment}ssl_certificate_key /usr/local/ispconfig/interface/ssl/ispserver.key;
88

99
# redirect to https if accessed with http
10-
{ssl_comment}error_page 497 https://$host:{vhost_port}$request_uri;
10+
{ssl_comment}error_page 497 https://$host:{apps_vhost_port}$request_uri;
1111

1212
server_name {apps_vhost_servername};
1313

install/tpl/nginx_ispconfig.vhost.master

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
server {
2-
listen {vhost_port} {ssl_on};
3-
listen [::]:{vhost_port} {ssl_on} ipv6only=on;
2+
listen {vhost_port} {ssl_on} http2;
3+
listen [::]:{vhost_port} {ssl_on} ipv6only=on http2;
44

55
{ssl_comment}ssl_protocols TLSv1.2;
66
{ssl_comment}ssl_certificate /usr/local/ispconfig/interface/ssl/ispserver.crt;
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# You can use this file for custom Postfix settings. The used settings will overrule the settings set by ISPConfig.
2+
# Use with caution!
3+
# Put this file in /usr/local/ispconfig/server/conf-custom/install/ and make your changes there.

interface/web/admin/lib/lang/ar_users_list.lng

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ $wb['username_txt'] = 'Username';
44
$wb['client_id_txt'] = 'Client ID';
55
$wb['active_txt'] = 'Active';
66
$wb['add_new_record_txt'] = 'Add new user';
7-
$wb['warning_txt'] = '<b>WARNING:</b> Do not edit or modify any user settings here. Use the Client- and Reseller settings in the Client module instead. Modifying or changing users or groups here may cause data loss!';
7+
$wb['warning_txt'] = '<b>WARNING:</b> Do not edit or modify any client user settings here. Use the client- and reseller settings in the client module instead. Modifying or changing client users or groups here may cause data loss!';
88
$wb['groups_txt'] = 'Groups';
99
?>

interface/web/admin/lib/lang/ca_users_list.lng

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ $wb['client_id_txt'] = 'User ID';
55
$wb['active_txt'] = 'Active';
66
$wb['groups_txt'] = 'Groups';
77
$wb['add_new_record_txt'] = 'Add new user';
8-
$wb['warning_txt'] = '<b>WARNING:</b> Do not edit or modify any user settings here. Use the Client- and Reseller settings in the Client module instead. Modifying or changing users or groups here may cause data loss!';
8+
$wb['warning_txt'] = '<b>WARNING:</b> Do not edit or modify any client user settings here. Use the client- and reseller settings in the client module instead. Modifying or changing client users or groups here may cause data loss!';
99
?>

0 commit comments

Comments
 (0)