diff --git a/web/api/v1/edit/mail/index.php b/web/api/v1/edit/mail/index.php index a886b203f8..e1e3768fb7 100644 --- a/web/api/v1/edit/mail/index.php +++ b/web/api/v1/edit/mail/index.php @@ -273,7 +273,7 @@ } // Delete FWD_ONLY flag - if (($v_fwd_only == 'yes') && (empty($_POST['v_fwd_only'])) && (empty($_SESSION['error_msg']))) { + if (($v_fwd_only == 'yes') && (empty($_POST['v_fwd_only']) or empty($forward)) && (empty($_SESSION['error_msg']))) { exec (VESTA_CMD."v-delete-mail-account-fwd-only ".$v_username." ".$v_domain." ".$v_account, $output, $return_var); check_return_code($return_var,$output); unset($output);