From b82009665670c55376d27149a25be23ed16c5814 Mon Sep 17 00:00:00 2001 From: andryyy Date: Mon, 14 Mar 2022 08:35:00 +0100 Subject: [PATCH] [Web] Delete related spam aliases when deleting alias domain --- data/web/inc/functions.mailbox.inc.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/data/web/inc/functions.mailbox.inc.php b/data/web/inc/functions.mailbox.inc.php index 21b6b130b..dccdcd93e 100644 --- a/data/web/inc/functions.mailbox.inc.php +++ b/data/web/inc/functions.mailbox.inc.php @@ -4054,6 +4054,10 @@ function mailbox($_action, $_type, $_data = null, $_extra = null) { $stmt->execute(array( ':alias_domain' => $alias_domain, )); + $stmt = $pdo->prepare("DELETE FROM `spamalias` WHERE `address` LIKE :domain"); + $stmt->execute(array( + ':domain' => '%@'.$alias_domain, + )); $stmt = $pdo->prepare("DELETE FROM `bcc_maps` WHERE `local_dest` = :alias_domain"); $stmt->execute(array( ':alias_domain' => $alias_domain,