Skip to content

Commit dbc4f81

Browse files
committed
updated install/dist/lib/gentoo.lib.php based on installer_base.lib.php
Signed-off-by: Christian Richter <motzned@gmail.com>
1 parent 905a7c9 commit dbc4f81

File tree

1 file changed

+15
-9
lines changed

1 file changed

+15
-9
lines changed

install/dist/lib/gentoo.lib.php

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -427,15 +427,15 @@ public function configure_dovecot() {
427427
foreach ($options as $value) {
428428
$value = trim($value);
429429
if ($value == '') continue;
430-
if (preg_match("|check_recipient_access\s+proxy:mysql:${quoted_config_dir}/mysql-verify_recipients.cf|", $value)) {
430+
if (preg_match("|check_recipient_access\s+proxy:mysql:{$quoted_config_dir}/mysql-verify_recipients.cf|", $value)) {
431431
continue;
432432
}
433433
$new_options[] = $value;
434434
}
435-
if ($configure_lmtp && $conf['mail']['content_filter'] === 'amavisd') {
435+
if ($configure_lmtp && (!isset($conf['mail']['content_filter']) || $conf['mail']['content_filter'] === 'amavisd')) {
436436
for ($i = 0; isset($new_options[$i]); $i++) {
437437
if ($new_options[$i] == 'reject_unlisted_recipient') {
438-
array_splice($new_options, $i+1, 0, array("check_recipient_access proxy:mysql:${config_dir}/mysql-verify_recipients.cf"));
438+
array_splice($new_options, $i+1, 0, array("check_recipient_access proxy:mysql:{$config_dir}/mysql-verify_recipients.cf"));
439439
break;
440440
}
441441
}
@@ -502,20 +502,26 @@ public function configure_dovecot() {
502502

503503
// Check if we have a dhparams file and if not, create it
504504
if(!file_exists('/etc/dovecot/dh.pem')) {
505-
swriteln('Creating new DHParams file, this takes several minutes. Do not interrupt the script.');
505+
// Create symlink to ISPConfig dhparam file
506+
swriteln('Creating symlink /etc/dovecot/dh.pem to ISPConfig DHParam file.');
507+
symlink('/usr/local/ispconfig/interface/ssl/dhparam4096.pem', '/etc/dovecot/dh.pem');
508+
509+
/*
510+
swriteln('Creating new DHParams file, this takes several minutes. Do not interrupt the script.');
506511
if(file_exists('/var/lib/dovecot/ssl-parameters.dat')) {
507512
// convert existing ssl parameters file
508513
$command = 'dd if=/var/lib/dovecot/ssl-parameters.dat bs=1 skip=88 | openssl dhparam -inform der > /etc/dovecot/dh.pem';
509514
caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
510515
} else {
511-
/*
512-
Create a new dhparams file. We use 2048 bit only as it simply takes too long
513-
on smaller systems to generate a 4096 bit dh file (> 30 minutes). If you need
514-
a 4096 bit file, create it manually before you install ISPConfig
515-
*/
516+
517+
//Create a new dhparams file. We use 2048 bit only as it simply takes too long
518+
//on smaller systems to generate a 4096 bit dh file (> 30 minutes). If you need
519+
// a 4096 bit file, create it manually before you install ISPConfig
520+
516521
$command = 'openssl dhparam -out /etc/dovecot/dh.pem 2048';
517522
caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
518523
}
524+
*/
519525
}
520526
//remove #2.3+ comment
521527
$content = file_get_contents($config_dir.'/'.$configfile);

0 commit comments

Comments
 (0)