From 77a81c7f8351919f5b77d62e7e301a999a5c10d0 Mon Sep 17 00:00:00 2001 From: eszel Date: Tue, 31 Jan 2023 11:23:42 +0100 Subject: [PATCH] Bugfix: remove fwd emails leaves fwd_only checkbox I managed to delete forwarding emails from an email account leaving the forward only checkbox checked, so the emails are not saved and also not forwarded.. I was also able to reproduce the error. This will fix that: if no forwarding emails set, it will remove the checkbox of "Do not store forwarded mail". --- web/api/v1/edit/mail/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);