config

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Path    string
	LogFd   *os.File
	PidFile struct {
		Path string `yaml:"Path"`
	} `yaml:"PIDFile"`
	MilterListen struct {
		Network string `yaml:"Network"`
		Address string `yaml:"Address"`
		Mode    uint32 `yaml:"Mode"`
	} `yaml:"MilterListen"`
	ControlSocketFile struct {
		Path string `yaml:"Path"`
		Mode uint32 `yaml:"Mode"`
	} `yaml:"ControlSocketFile"`
	LogFile struct {
		Path string `yaml:"Path"`
		Mode uint32 `yaml:"Mode"`
	} `yaml:"LogFile"`
	MyNetworks       []string `yaml:"MyNetworks"`
	ParsedMyNetworks []*net.IPNet
	Domains          map[string]Domain `yaml:"Domains"`
	User             string            `yaml:"User"`
	Group            string            `yaml:"Group"`
	Uid              int
	Gid              int
	Debug            bool     `yaml:"Debug"`
	ARCSignHeaders   []string `yaml:"ARCSignHeaders"`
	DKIMSignHeaders  []string `yaml:"DKIMSignHeaders"`
}

func Load

func Load(path string) (*Config, error)

func (*Config) IsMyNetwork added in v0.0.4

func (c *Config) IsMyNetwork(ip net.IP) bool

IsMyNetwork は指定されたIPアドレスが自分のネットワークに含まれるかを返す

type Domain

type Domain struct {
	HeaderCanonicalization string `yaml:"HeaderCanonicalization"`
	BodyCanonicalization   string `yaml:"BodyCanonicalization"`
	HashAlgorithm          string `yaml:"HashAlgorithm"`
	HashAlgo               crypto.Hash
	PrivateKeyFile         string `yaml:"PrivateKeyFile"`
	PrivateKeySigner       crypto.Signer
	Selector               string `yaml:"Selector"`
	Domain                 string
	DKIM                   bool `yaml:"DKIM"`
	ARC                    bool `yaml:"ARC"`
}

Jump to

Keyboard shortcuts

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