Handle use of [] around relay host
authorJamie Cameron <jcameron@webmin.com>
Wed, 1 Jun 2011 21:00:35 +0000 (14:00 -0700)
committerJamie Cameron <jcameron@webmin.com>
Wed, 1 Jun 2011 21:00:35 +0000 (14:00 -0700)
postfix/sasl.cgi
postfix/save_sasl.cgi

index 2310465..437acc2 100755 (executable)
@@ -69,6 +69,7 @@ print &ui_table_hr();
 
 # Get the current map value for the relayhost
 $rh = &get_current_value("relayhost");
+$rh =~ s/^\[(.*)\]$/$1/g;
 if ($rh) {
        $pmap = &get_maps("smtp_sasl_password_maps");
        foreach my $o (@$pmap) {
index c97acfa..c2c9067 100755 (executable)
@@ -54,6 +54,7 @@ if ($postfix_version >= 2.3) {
 
 # Save SMTP relay options
 $rh = &get_current_value("relayhost");
+$rh =~ s/^\[(.*)\]$/$1/g;
 if ($rh) {
        if ($in{'login_none'} == 0 &&
            !&get_current_value("smtp_sasl_password_maps")) {