mirror of
https://github.com/webmin/webmin.git
synced 2026-02-03 14:13:29 +00:00
Fix to default to mail_location
https://forum.virtualmin.com/t/bug-in-webmin-dovecot-mail-files-config/124425?u=ilia
This commit is contained in:
@@ -10,11 +10,11 @@ print &ui_table_start($text{'mail_header'}, "width=100%", 4);
|
||||
|
||||
# Mail file location. Old versions used default_mail_env, new uses mail_location
|
||||
$envmode = 4;
|
||||
if (&find("mail_location", $conf, 2)) {
|
||||
$env = &find_value("mail_location", $conf);
|
||||
if (&find("default_mail_env", $conf, 2)) {
|
||||
$env = &find_value("default_mail_env", $conf);
|
||||
}
|
||||
else {
|
||||
$env = &find_value("default_mail_env", $conf);
|
||||
$env = &find_value("mail_location", $conf);
|
||||
}
|
||||
if ($env =~ s/:INDEX=([^:]+)//) {
|
||||
$index = $1;
|
||||
|
||||
@@ -31,11 +31,11 @@ if ($in{'controlmode'}) {
|
||||
$env .= ":CONTROL=".$in{'control'};
|
||||
}
|
||||
|
||||
if (&find("mail_location", $conf, 2)) {
|
||||
&save_directive($conf, "mail_location", $env eq "" ? undef : $env);
|
||||
if (&find("default_mail_env", $conf, 2)) {
|
||||
&save_directive($conf, "default_mail_env", $env eq "" ? undef : $env);
|
||||
}
|
||||
else {
|
||||
&save_directive($conf, "default_mail_env", $env eq "" ? undef : $env);
|
||||
&save_directive($conf, "mail_location", $env eq "" ? undef : $env);
|
||||
}
|
||||
|
||||
# Idle intervals
|
||||
|
||||
Reference in New Issue
Block a user