mirror of
https://github.com/webmin/webmin.git
synced 2026-03-20 16:50:24 +00:00
Support mail_location
This commit is contained in:
@@ -10,3 +10,5 @@ Added support for the new configuration file format in Dovecot 1.0 alpha.
|
||||
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.
|
||||
|
||||
@@ -8,9 +8,14 @@ $conf = &get_config();
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -15,7 +15,12 @@ if ($in{'envmode'} == 4) {
|
||||
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'});
|
||||
|
||||
Reference in New Issue
Block a user