[Web] broadcast maildir move to dovecot containers on mailbox_rename

This commit is contained in:
FreddleSpl0it 2024-11-13 10:42:38 +01:00 committed by DerLinkman
parent b9f52df3f1
commit 6d1f7482ed
No known key found for this signature in database
GPG Key ID: AA4A82514748F5A9

View File

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