Incorrect postfix version test in postfix/sasl.cgi

Hi,

On Debian 8, Postfix version 2.11.3, I noticed that the TLS configuration wasn't showing the expected options. Looking at the source for postfix/sasl.cgi, it appears the version test is to blame:

SMTP TLS options

if ($postfix_version >= 2.3) { $level = &get_current_value("smtpd_tls_security_level"); print &ui_table_row($text{'opts_smtpd_use_tls'}, &ui_select("smtpd_tls_security_level", $level, [ [ "", $text{'default'} ], [ "none", $text{'sasl_level_none'} ], [ "may", $text{'sasl_level_may'} ], [ "encrypt", $text{'sasl_level_encrypt'} ] ])); } else { &option_yesno("smtpd_use_tls"); }

if (2.11 >= 2.3) { } does not work in this manner. Perl treats 2.11 as less than 2.3.

I believe the correct way to test this would be using the compare_versions() function from software/software-lib.pl:

SMTP TLS options

if (compare_versions($postfix_version, 2.3) >= 0) { $level = &get_current_value("smtpd_tls_security_level"); # ... else { &option_yesno("smtpd_use_tls"); }

Thanks,

Mike

Status: 
Closed (fixed)

Comments

Thanks for pointing this out - this will be fixed in the next webmin release.

Status: Active ยป Fixed