Documentation ¶
Index ¶
- Variables
- func LoadSpec(s *Script, spec *Spec, pos lexer.Position, args []parser.Arg, ...) error
- type AddressPart
- type AddressTest
- type AllOfTest
- type AnyOfTest
- type Callback
- type Cmd
- type CmdDiscard
- type CmdElse
- type CmdElsif
- type CmdFileInto
- type CmdIf
- type CmdKeep
- type CmdRedirect
- type CmdStop
- type Comparator
- type EnvelopeTest
- type ExistsTest
- type FalseTest
- type HeaderTest
- type Match
- type NotTest
- type Options
- type RuntimeData
- type SMTPEnvelope
- type Script
- type SizeTest
- type Spec
- type SpecPosArg
- type SpecTag
- type Test
- type TrueTest
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrComparatorMatchUnsupported = fmt.Errorf("match-comparator combination not supported")
View Source
var ErrStop = errors.New("interpreter: stop called")
Functions ¶
Types ¶
type AddressPart ¶
type AddressPart string
const ( LocalPart AddressPart = "localpart" Domain AddressPart = "domain" All AddressPart = "all" )
type AddressTest ¶
type AddressTest struct { Comparator Comparator AddressPart AddressPart Match Match Header []string Key []string }
func (AddressTest) Check ¶
func (a AddressTest) Check(ctx context.Context, d *RuntimeData) (bool, error)
type CmdDiscard ¶
type CmdDiscard struct{}
func (CmdDiscard) Execute ¶
func (c CmdDiscard) Execute(_ context.Context, d *RuntimeData) error
type CmdFileInto ¶
type CmdFileInto struct {
Mailbox string
}
func (CmdFileInto) Execute ¶
func (c CmdFileInto) Execute(ctx context.Context, d *RuntimeData) error
type CmdRedirect ¶
type CmdRedirect struct {
Addr string
}
func (CmdRedirect) Execute ¶
func (c CmdRedirect) Execute(ctx context.Context, d *RuntimeData) error
type Comparator ¶
type Comparator string
const ( ComparatorOctet Comparator = "i;octet" ComparatorASCIICaseMap Comparator = "i;ascii-casemap" ComparatorASCIINumeric Comparator = "i;ascii-numeric" ComparatorUnicodeCaseMap Comparator = "i;unicode-casemap" )
type EnvelopeTest ¶
type EnvelopeTest struct { Comparator Comparator AddressPart AddressPart Match Match Field []string Key []string }
func (EnvelopeTest) Check ¶
func (e EnvelopeTest) Check(ctx context.Context, d *RuntimeData) (bool, error)
type ExistsTest ¶
type ExistsTest struct {
Fields []string
}
func (ExistsTest) Check ¶
func (e ExistsTest) Check(ctx context.Context, d *RuntimeData) (bool, error)
type HeaderTest ¶
type HeaderTest struct { Comparator Comparator Match Match Header []string Key []string }
func (HeaderTest) Check ¶
func (h HeaderTest) Check(ctx context.Context, d *RuntimeData) (bool, error)
type RuntimeData ¶
type RuntimeData struct { Script *Script Callback Callback SMTP SMTPEnvelope MessageSize int RedirectAddr []string Mailboxes []string Keep bool ImplicitKeep bool // contains filtered or unexported fields }
func NewRuntimeData ¶
func NewRuntimeData(s *Script, p Callback) *RuntimeData
type SMTPEnvelope ¶
type Script ¶
type Script struct {
// contains filtered or unexported fields
}
func (Script) Extensions ¶
func (Script) RequiresExtension ¶
type SpecPosArg ¶
Click to show internal directories.
Click to hide internal directories.