Fixed a bug that causes config file corruption in the userdb section with the default Ubuntu config.
---- Changes since 1.330 ----
Added fields for editing the UIDL format and number of login processes.
+---- Changes since 1.360 ----
+Supported newer versions of Dovecot which use mail_location instead of default_mail_env.
print &ui_form_start("save_mail.cgi", "post");
print &ui_table_start($text{'mail_header'}, "width=100%", 4);
-# Mail file location
+# Mail file location. Old versions used default_mail_env, new uses mail_location
$envmode = 4;
-$env = &find_value("default_mail_env", $conf);
+if (&find("mail_location", $conf, 2)) {
+ $env = &find_value("mail_location", $conf);
+ }
+else {
+ $env = &find_value("default_mail_env", $conf);
+ }
for($i=0; $i<@mail_envs; $i++) {
$envmode = $i if ($mail_envs[$i] eq $env);
}
else {
$env = $mail_envs[$in{'envmode'}];
}
-&save_directive($conf, "default_mail_env", $env eq "" ? undef : $env);
+if (&find("mail_location", $conf, 2)) {
+ &save_directive($conf, "mail_location", $env eq "" ? undef : $env);
+ }
+else {
+ &save_directive($conf, "default_mail_env", $env eq "" ? undef : $env);
+ }
# Check and idle intervals
$in{'check'} != 2 || $in{'checki'} =~ /^\d+$/ || &error($text{'mail_echeck'});