From 09926702d6b17c72174299e9bdf8d9d5eb4c393b Mon Sep 17 00:00:00 2001 From: Florent Daigniere Date: Sat, 18 Dec 2021 13:59:31 +0100 Subject: [PATCH] fix 2086 --- core/dovecot/conf/ham.script | 4 ++-- core/dovecot/conf/spam.script | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/dovecot/conf/ham.script b/core/dovecot/conf/ham.script index 910df8e4..57112747 100755 --- a/core/dovecot/conf/ham.script +++ b/core/dovecot/conf/ham.script @@ -1,6 +1,6 @@ #!/bin/bash - -RSPAMD_HOST="$(getent hosts {{ ANTISPAM_WEBUI_ADDRESS }}|cut -d\ -f1)" +{% set hostname,port = ANTISPAM_WEBUI_ADDRESS.split(':') %} +RSPAMD_HOST="$(getent hosts {{ hostname }}|cut -d\ -f1):{{ port }}" if [[ $? -ne 0 ]] then echo "Failed to lookup {{ ANTISPAM_WEBUI_ADDRESS }}" >&2 diff --git a/core/dovecot/conf/spam.script b/core/dovecot/conf/spam.script index e7d20427..2e3872b0 100755 --- a/core/dovecot/conf/spam.script +++ b/core/dovecot/conf/spam.script @@ -1,6 +1,6 @@ #!/bin/bash - -RSPAMD_HOST="$(getent hosts {{ ANTISPAM_WEBUI_ADDRESS }}|cut -d\ -f1)" +{% set hostname,port = ANTISPAM_WEBUI_ADDRESS.split(':') %} +RSPAMD_HOST="$(getent hosts {{ hostname }}|cut -d\ -f1):{{ port }}" if [[ $? -ne 0 ]] then echo "Failed to lookup {{ ANTISPAM_WEBUI_ADDRESS }}" >&2