File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -416,18 +416,19 @@ public function configure_dovecot()
416416
417417 //* Get the dovecot version
418418 exec ('dovecot --version ' , $ tmp );
419- $ parts = explode ('. ' , trim ($ tmp [0 ]));
420- $ dovecot_version = $ parts [0 ];
419+ $ dovecot_version = $ tmp [0 ];
421420 unset($ tmp );
422- unset($ parts );
423421
424422 //* Copy dovecot configuration file
425- if ($ dovecot_version == 2 ) {
423+ if (version_compare ( $ dovecot_version, 2 ) >= 0 ) {
426424 if (is_file ($ conf ['ispconfig_install_dir ' ].'/server/conf-custom/install/fedora_dovecot2.conf.master ' )) {
427425 copy ($ conf ['ispconfig_install_dir ' ].'/server/conf-custom/install/fedora_dovecot2.conf.master ' , $ config_dir .'/ ' .$ configfile );
428426 } else {
429427 copy ('tpl/fedora_dovecot2.conf.master ' , $ config_dir .'/ ' .$ configfile );
430428 }
429+ if (version_compare ($ dovecot_version ,2.1 ) < 0 ) {
430+ removeLine ($ config_dir .'/ ' .$ configfile , 'ssl_protocols = ' );
431+ }
431432 } else {
432433 if (is_file ($ conf ['ispconfig_install_dir ' ].'/server/conf-custom/install/fedora_dovecot.conf.master ' )) {
433434 copy ($ conf ['ispconfig_install_dir ' ].'/server/conf-custom/install/fedora_dovecot.conf.master ' , $ config_dir .'/ ' .$ configfile );
You can’t perform that action at this time.
0 commit comments