module

Exu

Exu is the main namespace for the exu web administration daemon.

Constants

VERSION = "0.1.0"

The version of the exu application.

Class methods

assign_domain_to_user(username : String, domain : String)

Assign domain ownership to user in exu.yaml under lock

Source
autodiscover_xml

Returns the Microsoft Autodiscover configuration XML

Source
extract_cn(dn : String) : String

Extract Common Name (CN) from Client DN header

Source
extract_username_from_dn(dn : String) : String | Nil

ameba:disable Metrics/CyclomaticComplexity

Source
generate_session_token(username : String) : String

Generate HMAC-SHA256 signed session cookie token

Source
get_client_dn(env : HTTP::Server::Context) : String

Get client identity passed via mTLS header

Source
get_domain_dmarc(domain : String) : DmarcConfig

Get DMARC policy for a domain

Source
get_session_username(env : HTTP::Server::Context) : String | Nil

Extract authenticated username from session cookie or legacy client cert header fallback

Source
get_user_info(dn : String) : UserInfo

Load role mapping from exu.yaml config file

Source
get_user_info_by_username(username : String) : UserInfo

Load role mapping directly by username

Source
has_domain_access?(user_info : UserInfo, domain : String) : Bool

Verify domain access permissions

Source
mail_hostname

Returns the configured mail server hostname from /etc/mailname or System.hostname

Source
remove_domain_from_user(username : String, domain : String)

Remove domain ownership from user in exu.yaml under lock

Source
run_command(cmd : String, args : Array(String), input : String | Nil = nil) : Tuple(Bool, String)

Helper to run system commands safely with optional stdin input

Source
session_secret

Load or initialize persistent 256-bit HMAC session key

Source
set_domain_dmarc(domain : String, dmarc : DmarcConfig)

Update DMARC policy for a domain in exu.yaml under lock

Source
setup

ameba:disable Metrics/CyclomaticComplexity

Source
thunderbird_autoconfig_xml

Returns the Thunderbird autoconfig configuration XML

Source
verify_session_token(token : String) : String | Nil

Verify HMAC-SHA256 signed session token

Source

Nested types