@@ -1600,20 +1600,24 @@ public function configure_dovecot() {
16001600
16011601 // Check if we have a dhparams file and if not, create it
16021602 if (!file_exists ('/etc/dovecot/dh.pem ' )) {
1603+ // Create symlink to ISPConfig dhparam file
1604+ swriteln ('Creating symlink /etc/dovecot/dh.pem to ISPConfig DHParam file. ' );
1605+ symlink ('/usr/local/ispconfig/interface/ssl/dhparam4096.pem ' , '/etc/dovecot/dh.pem ' );
1606+
1607+ /*
16031608 swriteln('Creating new DHParams file, this takes several minutes. Do not interrupt the script.');
16041609 if(file_exists('/var/lib/dovecot/ssl-parameters.dat')) {
16051610 // convert existing ssl parameters file
16061611 $command = 'dd if=/var/lib/dovecot/ssl-parameters.dat bs=1 skip=88 | openssl dhparam -inform der > /etc/dovecot/dh.pem';
16071612 caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
16081613 } else {
1609- /*
1610- Create a new dhparams file. We use 2048 bit only as it simply takes too long
1611- on smaller systems to generate a 4096 bit dh file (> 30 minutes). If you need
1612- a 4096 bit file, create it manually before you install ISPConfig
1613- */
1614+ //Create a new dhparams file. We use 2048 bit only as it simply takes too long
1615+ // on smaller systems to generate a 4096 bit dh file (> 30 minutes). If you need
1616+ // a 4096 bit file, create it manually before you install ISPConfig
16141617 $command = 'openssl dhparam -out /etc/dovecot/dh.pem 2048';
16151618 caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
16161619 }
1620+ */
16171621 }
16181622 //remove #2.3+ comment
16191623 $ content = file_get_contents ($ config_dir .'/ ' .$ configfile );
@@ -3319,7 +3323,8 @@ public function make_ispconfig_ssl_cert() {
33193323 // Create symlink to ISPConfig SSL files
33203324 symlink ($ ssl_pem_file , $ pureftpd_pem );
33213325 if (!file_exists ("$ pureftpd_dir/pure-ftpd-dhparams.pem " ))
3322- exec ("cd $ pureftpd_dir; openssl dhparam -out dhparam2048.pem 2048; ln -sf dhparam2048.pem pure-ftpd-dhparams.pem " );
3326+ symlink ('/usr/local/ispconfig/interface/ssl/dhparam4096.pem ' , $ pureftpd_dir .'/pure-ftpd-dhparams.pem ' );
3327+ //exec("cd $pureftpd_dir; openssl dhparam -out dhparam2048.pem 2048; ln -sf dhparam2048.pem pure-ftpd-dhparams.pem");
33233328 }
33243329 }
33253330
0 commit comments