From 1819b6ea317a0008e0572ded689ac842c88b1022 Mon Sep 17 00:00:00 2001 From: FreddleSpl0it Date: Wed, 13 Nov 2024 10:42:38 +0100 Subject: [PATCH] [Web] broadcast maildir move to dovecot containers on mailbox_rename --- data/web/inc/functions.mailbox.inc.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/data/web/inc/functions.mailbox.inc.php b/data/web/inc/functions.mailbox.inc.php index 9de6656756..73c1154112 100644 --- a/data/web/inc/functions.mailbox.inc.php +++ b/data/web/inc/functions.mailbox.inc.php @@ -3351,7 +3351,12 @@ function mailbox($_action, $_type, $_data = null, $_extra = null) { 'old_maildir' => $domain . '/' . $old_local_part, 'new_maildir' => $domain . '/' . $new_local_part ); - docker('post', 'dovecot-mailcow', 'exec', $exec_fields); + if (getenv("CLUSTERMODE") == "replication") { + // broadcast to each dovecot container + docker('broadcast', 'dovecot-mailcow', 'exec', $exec_fields); + } else { + docker('post', 'dovecot-mailcow', 'exec', $exec_fields); + } // rename username in sogo $exec_fields = array(