mirror of
https://github.com/mailcow/mailcow-dockerized.git
synced 2025-12-25 07:41:30 +00:00
[DB][Web] optimize qhandler by keeping SHA2 in new column qhash (#6556)
* [DB][Web] optimize qhandler by keeping SHA2(id+qid) in new column quarantine.qhash, for feature #6555, might also help with #6361 * rspamd: only add qhash to new entries while passing rspamd not all existing * compose: bump dovecot image + push to registry --------- Co-authored-by: DerLinkman <niklas.meyer@servercow.de>
This commit is contained in:
committed by
GitHub
parent
8cdb0b869e
commit
2b2da1679e
@@ -236,6 +236,9 @@ foreach ($rcpt_final_mailboxes as $rcpt_final) {
|
||||
':action' => $action,
|
||||
':fuzzy_hashes' => $fuzzy
|
||||
));
|
||||
$lastId = $pdo->lastInsertId();
|
||||
$stmt_update = $pdo->prepare("UPDATE `quarantine` SET `qhash` = SHA2(CONCAT(`id`, `qid`), 256) WHERE `id` = :id");
|
||||
$stmt_update->execute(array(':id' => $lastId));
|
||||
$stmt = $pdo->prepare('DELETE FROM `quarantine` WHERE `rcpt` = :rcpt AND `id` NOT IN (
|
||||
SELECT `id`
|
||||
FROM (
|
||||
|
||||
Reference in New Issue
Block a user