From c1758934d6d036d09a2d541f62f50cfb2b70270c Mon Sep 17 00:00:00 2001 From: freimuts <43796070+freimuts@users.noreply.github.com> Date: Fri, 20 Sep 2024 00:42:36 +0300 Subject: [PATCH] Update postfix.sh --- data/Dockerfiles/postfix/postfix.sh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/data/Dockerfiles/postfix/postfix.sh b/data/Dockerfiles/postfix/postfix.sh index 8ffb76f6a..ec139fc53 100755 --- a/data/Dockerfiles/postfix/postfix.sh +++ b/data/Dockerfiles/postfix/postfix.sh @@ -182,16 +182,6 @@ dbname = ${DBNAME} query = SELECT CONCAT_WS(':', username, password) AS auth_data FROM relayhosts WHERE id IN ( SELECT COALESCE( - (SELECT id FROM relayhosts - LEFT OUTER JOIN domain ON domain.relayhost = relayhosts.id - WHERE relayhosts.active = '1' - AND (domain.domain = '%d' - OR domain.domain IN ( - SELECT target_domain FROM alias_domain - WHERE alias_domain = '%d' - ) - ) - ), (SELECT id FROM relayhosts LEFT OUTER JOIN mailbox ON JSON_UNQUOTE(JSON_VALUE(mailbox.attributes, '$.relayhost')) = relayhosts.id WHERE relayhosts.active = '1' @@ -204,6 +194,16 @@ query = SELECT CONCAT_WS(':', username, password) AS auth_data FROM relayhosts AND alias.address NOT LIKE '@%%' ) ) + ), + (SELECT id FROM relayhosts + LEFT OUTER JOIN domain ON domain.relayhost = relayhosts.id + WHERE relayhosts.active = '1' + AND (domain.domain = '%d' + OR domain.domain IN ( + SELECT target_domain FROM alias_domain + WHERE alias_domain = '%d' + ) + ) ) ) )