Skip to content

Commit 55dbf03

Browse files
author
Marius Burkard
committed
Merge branch 'stable-3.1' of git.ispconfig.org:ispconfig/ispconfig3 into stable-3.1
2 parents 20b7abe + ea111e9 commit 55dbf03

File tree

8 files changed

+134
-1
lines changed

8 files changed

+134
-1
lines changed

install/dist/lib/debian60.lib.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,12 @@ public function configure_dovecot()
136136
caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
137137
}
138138
}
139+
//remove #2.3+ comment
140+
$content = file_get_contents($config_dir.'/'.$configfile);
141+
$content = str_replace('#2.3+','',$content);
142+
file_put_contents($config_dir.'/'.$configfile,$content);
143+
unset($content);
144+
139145
} else {
140146
// remove settings which are not supported in Dovecot < 2.3
141147
removeLine($config_dir.'/'.$configfile, 'ssl_min_protocol =');

install/dist/lib/fedora.lib.php

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,38 @@ public function configure_dovecot()
449449
file_put_contents($config_dir.'/'.$configfile,$content);
450450
unset($content);
451451
}
452+
if(version_compare($dovecot_version,2.3) >= 0) {
453+
// Remove deprecated setting(s)
454+
removeLine($config_dir.'/'.$configfile, 'ssl_protocols =');
455+
456+
// Check if we have a dhparams file and if not, create it
457+
if(!file_exists('/etc/dovecot/dh.pem')) {
458+
swriteln('Creating new DHParams file, this takes several minutes. Do not interrupt the script.');
459+
if(file_exists('/var/lib/dovecot/ssl-parameters.dat')) {
460+
// convert existing ssl parameters file
461+
$command = 'dd if=/var/lib/dovecot/ssl-parameters.dat bs=1 skip=88 | openssl dhparam -inform der > /etc/dovecot/dh.pem';
462+
caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
463+
} else {
464+
/*
465+
Create a new dhparams file. We use 2048 bit only as it simply takes too long
466+
on smaller systems to generate a 4096 bit dh file (> 30 minutes). If you need
467+
a 4096 bit file, create it manually before you install ISPConfig
468+
*/
469+
$command = 'openssl dhparam -out /etc/dovecot/dh.pem 2048';
470+
caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
471+
}
472+
}
473+
//remove #2.3+ comment
474+
$content = file_get_contents($config_dir.'/'.$configfile);
475+
$content = str_replace('#2.3+','',$content);
476+
file_put_contents($config_dir.'/'.$configfile,$content);
477+
unset($content);
478+
479+
} else {
480+
// remove settings which are not supported in Dovecot < 2.3
481+
removeLine($config_dir.'/'.$configfile, 'ssl_min_protocol =');
482+
removeLine($config_dir.'/'.$configfile, 'ssl_dh =');
483+
}
452484
replaceLine($config_dir.'/'.$configfile, 'postmaster_address = postmaster@example.com', 'postmaster_address = postmaster@'.$conf['hostname'], 1, 0);
453485
replaceLine($config_dir.'/'.$configfile, 'postmaster_address = webmaster@localhost', 'postmaster_address = postmaster@'.$conf['hostname'], 1, 0);
454486
} else {

install/lib/installer_base.lib.php

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1304,6 +1304,38 @@ public function configure_dovecot() {
13041304
file_put_contents($config_dir.'/'.$configfile,$content);
13051305
unset($content);
13061306
}
1307+
if(version_compare($dovecot_version,2.3) >= 0) {
1308+
// Remove deprecated setting(s)
1309+
removeLine($config_dir.'/'.$configfile, 'ssl_protocols =');
1310+
1311+
// Check if we have a dhparams file and if not, create it
1312+
if(!file_exists('/etc/dovecot/dh.pem')) {
1313+
swriteln('Creating new DHParams file, this takes several minutes. Do not interrupt the script.');
1314+
if(file_exists('/var/lib/dovecot/ssl-parameters.dat')) {
1315+
// convert existing ssl parameters file
1316+
$command = 'dd if=/var/lib/dovecot/ssl-parameters.dat bs=1 skip=88 | openssl dhparam -inform der > /etc/dovecot/dh.pem';
1317+
caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
1318+
} else {
1319+
/*
1320+
Create a new dhparams file. We use 2048 bit only as it simply takes too long
1321+
on smaller systems to generate a 4096 bit dh file (> 30 minutes). If you need
1322+
a 4096 bit file, create it manually before you install ISPConfig
1323+
*/
1324+
$command = 'openssl dhparam -out /etc/dovecot/dh.pem 2048';
1325+
caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
1326+
}
1327+
}
1328+
//remove #2.3+ comment
1329+
$content = file_get_contents($config_dir.'/'.$configfile);
1330+
$content = str_replace('#2.3+','',$content);
1331+
file_put_contents($config_dir.'/'.$configfile,$content);
1332+
unset($content);
1333+
1334+
} else {
1335+
// remove settings which are not supported in Dovecot < 2.3
1336+
removeLine($config_dir.'/'.$configfile, 'ssl_min_protocol =');
1337+
removeLine($config_dir.'/'.$configfile, 'ssl_dh =');
1338+
}
13071339
}
13081340

13091341
//* dovecot-lmtpd
@@ -2322,6 +2354,7 @@ public function configure_apps_vhost() {
23222354
|| file_exists('/var/run/php/php7.1-fpm.sock')
23232355
|| file_exists('/var/run/php/php7.2-fpm.sock')
23242356
|| file_exists('/var/run/php/php7.3-fpm.sock')
2357+
|| file_exists('/var/run/php/php7.4-fpm.sock')
23252358
){
23262359
$use_tcp = '#';
23272360
$use_socket = '';
@@ -2340,6 +2373,8 @@ public function configure_apps_vhost() {
23402373
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);
23412374
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);
23422375
if(file_exists('/var/run/php/php7.2-fpm.sock')) $content = str_replace('/var/run/php5-fpm.sock', '/var/run/php/php7.2-fpm.sock', $content);
2376+
if(file_exists('/var/run/php/php7.3-fpm.sock')) $content = str_replace('/var/run/php5-fpm.sock', '/var/run/php/php7.3-fpm.sock', $content);
2377+
if(file_exists('/var/run/php/php7.4-fpm.sock')) $content = str_replace('/var/run/php5-fpm.sock', '/var/run/php/php7.4-fpm.sock', $content);
23432378

23442379
wf($vhost_conf_dir.'/apps.vhost', $content);
23452380

install/tpl/debian6_dovecot2.conf.master

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,3 +68,18 @@ protocol lmtp {
6868
postmaster_address = webmaster@localhost
6969
mail_plugins = quota sieve
7070
}
71+
72+
#2.3+ service stats {
73+
#2.3+ unix_listener stats-reader {
74+
#2.3+ user = vmail
75+
#2.3+ group = vmail
76+
#2.3+ mode = 0660
77+
#2.3+ }
78+
#2.3+
79+
#2.3+ unix_listener stats-writer {
80+
#2.3+ user = vmail
81+
#2.3+ group = vmail
82+
#2.3+ mode = 0660
83+
#2.3+ }
84+
#2.3+ }
85+

install/tpl/debian_dovecot2.conf.master

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,19 @@ protocol lmtp {
6464
postmaster_address = webmaster@localhost
6565
mail_plugins = quota sieve
6666
}
67+
6768
mail_plugins = $mail_plugins quota
69+
70+
#2.3+ service stats {
71+
#2.3+ unix_listener stats-reader {
72+
#2.3+ user = vmail
73+
#2.3+ group = vmail
74+
#2.3+ mode = 0660
75+
#2.3+ }
76+
#2.3+
77+
#2.3+ unix_listener stats-writer {
78+
#2.3+ user = vmail
79+
#2.3+ group = vmail
80+
#2.3+ mode = 0660
81+
#2.3+ }
82+
#2.3+ }

install/tpl/fedora_dovecot2.conf.master

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,19 @@ protocol lmtp {
6161
postmaster_address = webmaster@localhost
6262
mail_plugins = quota sieve
6363
}
64+
6465
mail_plugins = $mail_plugins quota
66+
67+
#2.3+ service stats {
68+
#2.3+ unix_listener stats-reader {
69+
#2.3+ user = vmail
70+
#2.3+ group = vmail
71+
#2.3+ mode = 0660
72+
#2.3+ }
73+
#2.3+
74+
#2.3+ unix_listener stats-writer {
75+
#2.3+ user = vmail
76+
#2.3+ group = vmail
77+
#2.3+ mode = 0660
78+
#2.3+ }
79+
#2.3+ }

install/tpl/opensuse_dovecot2.conf.master

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,19 @@ protocol lmtp {
6060
postmaster_address = webmaster@localhost
6161
mail_plugins = quota sieve
6262
}
63+
6364
mail_plugins = $mail_plugins quota
65+
66+
#2.3+ service stats {
67+
#2.3+ unix_listener stats-reader {
68+
#2.3+ user = vmail
69+
#2.3+ group = vmail
70+
#2.3+ mode = 0660
71+
#2.3+ }
72+
#2.3+
73+
#2.3+ unix_listener stats-writer {
74+
#2.3+ user = vmail
75+
#2.3+ group = vmail
76+
#2.3+ mode = 0660
77+
#2.3+ }
78+
#2.3+ }

server/plugins-available/bind_plugin.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ function soa_delete($event_name, $data) {
391391
$app->log("Deleting BIND domain file: ".$zone_file_name, LOGLEVEL_DEBUG);
392392

393393
//* DNSSEC-Implementation
394-
if($data['old']['dnssec_initialized'] == 'Y') {
394+
if($data['old']['dnssec_initialized'] == 'Y' && file_exists('/usr/local/ispconfig/server/scripts/dnssec-delete.sh')) {
395395
//delete keys
396396
$app->system->exec_safe('/usr/local/ispconfig/server/scripts/dnssec-delete.sh ?', $data['old']['origin']);
397397
}

0 commit comments

Comments
 (0)