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.
This commit is contained in:
parent
6604092800
commit
a900d16b53
1 changed files with 1 additions and 1 deletions
|
@ -7,4 +7,4 @@ user = {{ mailserver.postgresql.username }}
|
|||
password = {{ mailserver.postgresql.password }}
|
||||
dbname = {{ mailserver.postgresql.dbname }}
|
||||
hosts = {{ mailserver.postgresql.host }}
|
||||
query = SELECT unnest(forwardings) FROM aliases WHERE alias = '%s'
|
||||
query = SELECT unnest(a.forwardings) FROM aliases a JOIN domains d ON a.alias_domain_id=d.id WHERE a.alias || '@' || d.name = '%s'
|
||||
|
|
Loading…
Reference in a new issue