ansible-mailserver-debian/mail_system/templates/postfix/aliases.cf
ibu radempa a900d16b53 Change data models for aliases in mail_system. REQUIRES MANUAL CHANGES TO DATA!
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.
2020-09-04 18:10:20 +02:00

11 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'