@@ -885,12 +885,12 @@ public function configure_saslauthd() {
885885 unset($ parts );
886886 unset($ out );
887887
888- if (version_compare ($ saslversion , '2.1.23 ' ) > 0 ) {
889- //* Configfile for saslauthd versions 2.1.24 and newer
890- $ configfile = 'sasl_smtpd2.conf ' ;
891- } else {
888+ if (version_compare ($ saslversion , '2.1.23 ' , '<= ' )) {
892889 //* Configfile for saslauthd versions up to 2.1.23
893890 $ configfile = 'sasl_smtpd.conf ' ;
891+ } else {
892+ //* Configfile for saslauthd versions 2.1.24 and newer
893+ $ configfile = 'sasl_smtpd2.conf ' ;
894894 }
895895
896896 if (is_file ($ conf ['postfix ' ]['config_dir ' ].'/sasl/smtpd.conf ' )) copy ($ conf ['postfix ' ]['config_dir ' ].'/sasl/smtpd.conf ' , $ conf ['postfix ' ]['config_dir ' ].'/sasl/smtpd.conf~ ' );
@@ -1052,22 +1052,22 @@ public function configure_dovecot() {
10521052 unset($ tmp );
10531053
10541054 //* Copy dovecot configuration file
1055- if (version_compare ($ dovecot_version ,2 ) >= 0 ) {
1055+ if (version_compare ($ dovecot_version ,1 , '<= ' )) { //* Dovecot 1.x
1056+ if (is_file ($ conf ['ispconfig_install_dir ' ].'/server/conf-custom/install/debian_dovecot.conf.master ' )) {
1057+ copy ($ conf ['ispconfig_install_dir ' ].'/server/conf-custom/install/debian_dovecot.conf.master ' , $ config_dir .'/ ' .$ configfile );
1058+ } else {
1059+ copy ('tpl/debian_dovecot.conf.master ' , $ config_dir .'/ ' .$ configfile );
1060+ }
1061+ } else { //* Dovecot 2.x
10561062 if (is_file ($ conf ['ispconfig_install_dir ' ].'/server/conf-custom/install/debian_dovecot2.conf.master ' )) {
10571063 copy ($ conf ['ispconfig_install_dir ' ].'/server/conf-custom/install/debian_dovecot2.conf.master ' , $ config_dir .'/ ' .$ configfile );
10581064 } else {
10591065 copy ('tpl/debian_dovecot2.conf.master ' , $ config_dir .'/ ' .$ configfile );
10601066 }
10611067 replaceLine ($ config_dir .'/ ' .$ configfile , 'postmaster_address = postmaster@example.com ' , 'postmaster_address = postmaster@ ' .$ conf ['hostname ' ], 1 , 0 );
1062- if (version_compare ($ dovecot_version ,2.1 ) < 0 ) {
1068+ if (version_compare ($ dovecot_version , 2.1 , ' < ' ) ) {
10631069 removeLine ($ config_dir .'/ ' .$ configfile , 'ssl_protocols = ' );
10641070 }
1065- } else {
1066- if (is_file ($ conf ['ispconfig_install_dir ' ].'/server/conf-custom/install/debian_dovecot.conf.master ' )) {
1067- copy ($ conf ['ispconfig_install_dir ' ].'/server/conf-custom/install/debian_dovecot.conf.master ' , $ config_dir .'/ ' .$ configfile );
1068- } else {
1069- copy ('tpl/debian_dovecot.conf.master ' , $ config_dir .'/ ' .$ configfile );
1070- }
10711071 }
10721072
10731073 //* dovecot-sql.conf
0 commit comments