Skip to content

Commit a16901b

Browse files
committed
[Webui] After changing web domain IP also change mail domain ip
1 parent 2ed1bc2 commit a16901b

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

web/edit/web/index.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,18 @@
174174
}
175175
}
176176

177+
// Change mail domain IP
178+
if (($v_ip != $_POST['v_ip']) && (empty($_SESSION['error_msg']))) {
179+
exec (HESTIA_CMD."v-list-mail-domain ".$v_username." ".escapeshellarg($v_domain)." json", $output, $return_var);
180+
unset($output);
181+
if ($return_var == 0 ) {
182+
exec (HESTIA_CMD."v-rebuild-mail-domain ".$v_username." ".escapeshellarg($v_domain), $output, $return_var);
183+
check_return_code($return_var,$output);
184+
unset($output);
185+
$restart_email = 'yes';
186+
}
187+
}
188+
177189
// Change template
178190
if (($v_template != $_POST['v_template']) && (empty($_SESSION['error_msg']))) {
179191
exec (HESTIA_CMD."v-change-web-domain-tpl ".$v_username." ".escapeshellarg($v_domain)." ".escapeshellarg($_POST['v_template'])." 'no'", $output, $return_var);

0 commit comments

Comments
 (0)