mirror of
https://blitiri.com.ar/repos/chasquid
synced 2026-01-09 17:55:57 +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:
@@ -3,6 +3,7 @@ package courier
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"os/exec"
|
||||
"strings"
|
||||
@@ -108,3 +109,11 @@ func sanitizeForMDA(s string) string {
|
||||
}
|
||||
return strings.Map(valid, s)
|
||||
}
|
||||
|
||||
var errForwardNotSupported = errors.New(
|
||||
"forwarding not supported by the MDA courier")
|
||||
|
||||
// Forward is not supported by the MDA courier.
|
||||
func (p *MDA) Forward(from string, to string, data []byte, servers []string) (error, bool) {
|
||||
return errForwardNotSupported, true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user