1
0
mirror of https://github.com/mailcow/mailcow-dockerized.git synced 2025-01-20 04:59:27 +02:00

[Web] Delete related spam aliases when deleting alias domain

This commit is contained in:
andryyy 2022-03-14 08:35:00 +01:00
parent 98bc947d00
commit b820096656

View File

@ -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,