mirror of
https://blitiri.com.ar/repos/chasquid
synced 2026-01-07 17:47:14 +00:00
aliases: Implement "via" aliases
This patch implements "via" aliases, which let us explicitly select a server to use for delivery. This feature is useful in different scenarios, such as a secondary MX server that forwards all incoming email to a primary. For now, it is experimental and the syntax and semantics are subject to change.
This commit is contained in:
@@ -123,3 +123,15 @@ func TestSanitize(t *testing.T) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestForward(t *testing.T) {
|
||||
p := MDA{"thisdoesnotexist", nil, 1 * time.Minute}
|
||||
err, permanent := p.Forward(
|
||||
"from", "to", []byte("data"), []string{"server"})
|
||||
if err != errForwardNotSupported {
|
||||
t.Errorf("unexpected error: %v", err)
|
||||
}
|
||||
if !permanent {
|
||||
t.Errorf("expected permanent, got transient")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user