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

Method Configure

internal/table/email_with_domain.go:48–61  ·  view source on GitHub ↗
(inlineArgs []string, cfg *config.Map)

Source from the content-addressed store, hash-verified

46}
47
48func (s *EmailWithDomain) Configure(inlineArgs []string, cfg *config.Map) error {
49 s.domains = inlineArgs
50
51 for _, d := range s.domains {
52 if !address.ValidDomain(d) {
53 return fmt.Errorf("%s: invalid domain: %s", s.modName, d)
54 }
55 }
56 if len(s.domains) == 0 {
57 return fmt.Errorf("%s: at least one domain is required", s.modName)
58 }
59
60 return nil
61}
62
63func (s *EmailWithDomain) Name() string {
64 return s.modName

Callers

nothing calls this directly

Calls 1

ValidDomainFunction · 0.92

Tested by

no test coverage detected