mtasts

package
v0.0.0-...-039bb7d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 20, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

The mtasts policy implements parsing, caching and checking of MTA-STS (RFC 8461) policies.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadDNSRecord

func ReadDNSRecord(raw string) (id string, err error)

Types

type MalformedDNSRecordError

type MalformedDNSRecordError struct {
	// Additional description of the error.
	Desc string
}

func (MalformedDNSRecordError) Error

func (e MalformedDNSRecordError) Error() string

type MalformedPolicyError

type MalformedPolicyError struct {
	// Additional description of the error.
	Desc string
}

func (MalformedPolicyError) Error

func (e MalformedPolicyError) Error() string

type Mode

type Mode string
const (
	ModeEnforce Mode = "enforce"
	ModeTesting Mode = "testing"
	ModeNone    Mode = "none"
)

type Policy

type Policy struct {
	Mode   Mode
	MaxAge int
	MX     []string
}

func DownloadPolicy

func DownloadPolicy(domain string) (*Policy, string, error)

func (Policy) Match

func (p Policy) Match(mx string) bool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL