Exu::Config
Inherits JSON::Serializable < YAML::Serializable < Struct < Value < Object
Master System Configuration
Constructors
load(path : String = config_path) : Config
Loads the configuration from disk, falling back to defaults if not found
new(ctx : YAML::ParseContext, node : YAML::Nodes::Node)
Sourcenew(pull : JSON::PullParser)
Sourcenew(version : String = "1.0", users : Hash(String, UserConfig) = {} of String => UserConfig, domains : Hash(String, DomainConfig) = {} of String => DomainConfig)
Sourcenew(*, __context_for_yaml_serializable ctx : YAML::ParseContext, __node_for_yaml_serializable node : YAML::Nodes::Node)
Sourcenew(*, __pull_for_json_serializable pull : JSON::PullParser)
SourceClass methods
config_path
Sourcedkim_dns_record(domain : String, dkim_dir : String = "/etc/exu/dkim") : NamedTuple(host: String, type: String, value: String) | Nil
Formats DKIM public key DNS TXT record
dmarc_dns_record(domain : String, dmarc : DmarcConfig) : NamedTuple(host: String, type: String, value: String)
Formats DMARC DNS TXT record
lock_path
Sourcemx_dns_record(domain : String, mail_hostname : String) : NamedTuple(host: String, type: String, priority: Int32, value: String)
Formats MX DNS record
save(config : Config, path : String = config_path)
Saves the configuration atomically to disk under lock
spf_dns_record(domain : String, mail_hostname : String) : NamedTuple(host: String, type: String, value: String)
Formats SPF DNS TXT record
with_lock(timeout_seconds : Float64 = 5.0, &)
Acquire advisory file lock for safe mutations across processes
Instance methods
domains
Sourcedomains=(domains : Hash(String, DomainConfig))
Sourceusers
Sourceusers=(users : Hash(String, UserConfig))
Sourceversion
Sourceversion=(version : String)
Source