MCPcopy Create free account
hub / github.com/foxcpp/maddy / RewriteRcpt

Method RewriteRcpt

internal/modify/group.go:99–115  ·  view source on GitHub ↗
(ctx context.Context, rcptTo string)

Source from the content-addressed store, hash-verified

97}
98
99func (gs groupState) RewriteRcpt(ctx context.Context, rcptTo string) ([]string, error) {
100 var err error
101 var result = []string{rcptTo}
102 for _, state := range gs.states {
103 var intermediateResult = []string{}
104 for _, partResult := range result {
105 var partResult_multi []string
106 partResult_multi, err = state.RewriteRcpt(ctx, partResult)
107 if err != nil {
108 return []string{""}, err
109 }
110 intermediateResult = append(intermediateResult, partResult_multi...)
111 }
112 result = intermediateResult
113 }
114 return result, nil
115}
116
117func (gs groupState) RewriteBody(ctx context.Context, h *textproto.Header, body buffer.Buffer) error {
118 for _, state := range gs.states {

Callers

nothing calls this directly

Calls 1

RewriteRcptMethod · 0.65

Tested by

no test coverage detected