Skip to content

Commit

Permalink
Update postfix.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
freimuts authored Sep 19, 2024
1 parent 220fdbb commit c175893
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions data/Dockerfiles/postfix/postfix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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'
)
)
)
)
)
Expand Down

0 comments on commit c175893

Please sign in to comment.