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

Method CheckStateForMsg

framework/module/check.go:42–42  ·  view source on GitHub ↗

CheckStateForMsg initializes the "internal" check state required for processing of the new message. NOTE: Returned CheckState object must be hashable (usable as a map key). This is used to deduplicate Check* calls, the easiest way to achieve this is to have CheckState as a pointer to some struct, a

(ctx context.Context, msgMeta *MsgMetadata)

Source from the content-addressed store, hash-verified

40 // this is to have CheckState as a pointer to some struct, all pointers
41 // are hashable.
42 CheckStateForMsg(ctx context.Context, msgMeta *MsgMetadata) (CheckState, error)
43}
44
45// EarlyCheck is an optional module interface that can be implemented

Callers 8

checkStatesMethod · 0.65
TestDkimVerify_NoSigFunction · 0.65
TestDkimVerify_ValidSigFunction · 0.65
TestDkimVerify_FailOpenFunction · 0.65

Implementers 10

Checkinternal/testutils/check.go
Checkinternal/check/skeleton.go
statelessCheckinternal/check/stateless_check.go
Checkinternal/check/spf/spf.go
DNSBLinternal/check/dnsbl/dnsbl.go
Checkinternal/check/rspamd/rspamd.go
Checkinternal/check/command/command.go
Checkinternal/check/dkim/dkim.go
Checkinternal/check/milter/milter.go
Checkinternal/check/authorize_sender/author

Calls

no outgoing calls

Tested by 7

TestDkimVerify_NoSigFunction · 0.52
TestDkimVerify_ValidSigFunction · 0.52
TestDkimVerify_FailOpenFunction · 0.52