Skip to content

Commit

Permalink
Fix to default to mail_location
Browse files Browse the repository at this point in the history
  • Loading branch information
iliajie committed Jan 12, 2024
1 parent 26cb81a commit f244805
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions dovecot/edit_mail.cgi
Expand Up @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions dovecot/save_mail.cgi
Expand Up @@ -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
Expand Down

0 comments on commit f244805

Please sign in to comment.