Skip to content

Commit 0618a77

Browse files
authored
Fix bug with rejecting spam on edit mail domain (hestiacp#2551)
1 parent c90cedc commit 0618a77

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

web/edit/mail/index.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,19 @@
212212
}
213213
unset($output);
214214
}
215+
216+
if (!empty($_POST['v_reject']) && $v_antispam == "yes" && $v_reject != 'yes' ) {
217+
exec(HESTIA_CMD."v-add-mail-domain-reject ".$user." ".$v_domain." yes", $output, $return_var);
218+
check_return_code($return_var, $output);
219+
$v_reject = 'yes';
220+
unset($output);
221+
}
222+
if (empty($_POST['v_reject']) && $v_reject == 'yes' ) {
223+
exec(HESTIA_CMD."v-delete-mail-domain-reject ".$user." ".$v_domain." yes", $output, $return_var);
224+
check_return_code($return_var, $output);
225+
$v_reject = '';
226+
unset($output);
227+
}
215228

216229
// Change catchall address
217230
if ((!empty($v_catchall)) && (!empty($_POST['v_catchall'])) && (empty($_SESSION['error_msg']))) {

web/templates/pages/edit_mail.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101
</td>
102102
</tr>
103103
<tr>
104-
<td class="vst-text input-label step-top">
104+
<td class="vst-text input-label">
105105
<label><input type="checkbox" size="20" class="vst-checkbox" name="v_reject" <?php if ($v_reject == 'yes') echo "checked=yes"; ?>><?=_('Reject spam');?></label>
106106
</td>
107107
</tr>

0 commit comments

Comments
 (0)