1
0
mirror of https://blitiri.com.ar/repos/chasquid synced 2025-12-27 16:17:03 +00:00

chasquid: Load and resolve aliases

This patch integrates the aliases resolution into the daemon and queue.

The queue now will resolve aliases at Put time.
This commit is contained in:
Alberto Bertogli
2016-09-22 00:22:39 +01:00
parent bab8a8083c
commit c34c073c1c
15 changed files with 251 additions and 32 deletions

View File

@@ -191,6 +191,10 @@ func (v *Resolver) AddAliasesFile(domain, path string) error {
return nil
}
func (v *Resolver) AddAliasForTesting(addr, rcpt string, rType RType) {
v.aliases[addr] = append(v.aliases[addr], Recipient{rcpt, rType})
}
func (v *Resolver) Reload() error {
newAliases := map[string][]Recipient{}