take into account public domain in pgsql-relay-domains.cf and /etc/postfix/pgsql-transport-maps.cf

This commit is contained in:
Son 2022-06-15 16:47:34 +02:00
parent 39aeb81f9a
commit 3e0497ff59

View File

@ -345,6 +345,7 @@ password = mypassword
dbname = simplelogin dbname = simplelogin
query = SELECT domain FROM custom_domain WHERE domain='%s' AND verified=true query = SELECT domain FROM custom_domain WHERE domain='%s' AND verified=true
UNION SELECT domain FROM public_domain WHERE domain='%s'
UNION SELECT '%s' WHERE '%s' = 'mydomain.com' LIMIT 1; UNION SELECT '%s' WHERE '%s' = 'mydomain.com' LIMIT 1;
``` ```
@ -360,6 +361,7 @@ dbname = simplelogin
# forward to smtp:127.0.0.1:20381 for custom domain AND email domain # forward to smtp:127.0.0.1:20381 for custom domain AND email domain
query = SELECT 'smtp:127.0.0.1:20381' FROM custom_domain WHERE domain = '%s' AND verified=true query = SELECT 'smtp:127.0.0.1:20381' FROM custom_domain WHERE domain = '%s' AND verified=true
UNION SELECT 'smtp:127.0.0.1:2025' FROM public_domain WHERE domain = '%s'
UNION SELECT 'smtp:127.0.0.1:20381' WHERE '%s' = 'mydomain.com' LIMIT 1; UNION SELECT 'smtp:127.0.0.1:20381' WHERE '%s' = 'mydomain.com' LIMIT 1;
``` ```