a900d16b53
When matching an alias do no more match it against the value of field alias in the aliases table, but match it against the concatenation of this value with '@' and the value of the name field in the domains table, where the row is obtained by matching aliases.alias_domain_id and domains.id.
10 lines
397 B
CFEngine3
10 lines
397 B
CFEngine3
# THIS FILE IS CONTROLLED BY ANSIBLE - DO NOT CHANGE IN DEPLOYMENT!
|
|
|
|
|
|
# man pgsql_table
|
|
|
|
user = {{ mailserver.postgresql.username }}
|
|
password = {{ mailserver.postgresql.password }}
|
|
dbname = {{ mailserver.postgresql.dbname }}
|
|
hosts = {{ mailserver.postgresql.host }}
|
|
query = SELECT unnest(a.forwardings) FROM aliases a JOIN domains d ON a.alias_domain_id=d.id WHERE a.alias || '@' || d.name = '%s'
|