From 59df735aa8628f82c27b9252c3411dc4162bd449 Mon Sep 17 00:00:00 2001 From: andryyy Date: Wed, 30 Oct 2019 14:37:44 +0100 Subject: [PATCH] [Web] Filter duplicates when adding multiple transports --- data/Dockerfiles/rspamd/docker-entrypoint.sh | 3 --- data/web/inc/functions.transports.inc.php | 2 +- docker-compose.yml | 2 +- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/data/Dockerfiles/rspamd/docker-entrypoint.sh b/data/Dockerfiles/rspamd/docker-entrypoint.sh index fc0bfb72..84919dc4 100755 --- a/data/Dockerfiles/rspamd/docker-entrypoint.sh +++ b/data/Dockerfiles/rspamd/docker-entrypoint.sh @@ -1,8 +1,5 @@ #!/bin/bash -echo "Waiting for PHP to settle..." -sleep 10 - until nc phpfpm 9001 -z; do echo "Waiting for PHP on port 9001..." sleep 3 diff --git a/data/web/inc/functions.transports.inc.php b/data/web/inc/functions.transports.inc.php index f87a7c01..95bc726d 100644 --- a/data/web/inc/functions.transports.inc.php +++ b/data/web/inc/functions.transports.inc.php @@ -243,7 +243,7 @@ function transport($_action, $_data = null) { } } } - $destinations = array_values($destinations); + $destinations = array_values(array_unique($destinations)); if (empty($destinations)) { return false; } if (isset($next_hop_matches[1])) { if (in_array($next_hop_clean, $existing_nh)) { diff --git a/docker-compose.yml b/docker-compose.yml index 3aeda03b..99c89b2d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -68,7 +68,7 @@ services: - clamd rspamd-mailcow: - image: mailcow/rspamd:1.51 + image: mailcow/rspamd:1.52 build: ./data/Dockerfiles/rspamd stop_grace_period: 30s depends_on: