chatmail-control — API
AuditEvent
Section titled “AuditEvent”pub struct AuditEventpub async fn log_event(pub async fn latest(pool: &SqlitePool, limit: i64) -> AppResult<Vec<AuditEvent>>pub struct AdminSession
Section titled “Session”pub struct SessionLoginRateLimiter
Section titled “LoginRateLimiter”pub struct LoginRateLimiterLoginForm
Section titled “LoginForm”pub struct LoginFormCsrfForm
Section titled “CsrfForm”pub struct CsrfFormCurrentAdmin
Section titled “CurrentAdmin”pub struct CurrentAdminpub async fn require_admin(hash_password(password:
Section titled “hash_password(password:”pub fn hash_password(password: &str) -> AppResult<String>verify_password(password:
Section titled “verify_password(password:”pub fn verify_password(password: &str, hash: &str) -> AppResult<bool>pub async fn upsert_admin(pool: &SqlitePool, username: &str, password: &str) -> AppResult<()>pub async fn authenticate(pub async fn logout(validate_csrf(current:
Section titled “validate_csrf(current:”pub fn validate_csrf(current: &CurrentAdmin, token: &str) -> AppResult<()>pub struct BanCreateBan<‘a>
Section titled “CreateBan<‘a>”pub struct CreateBan<'a>SetBanActiveByValue<‘a>
Section titled “SetBanActiveByValue<‘a>”pub struct SetBanActiveByValue<'a>pub async fn list(pool: &SqlitePool, query: Option<&str>) -> AppResult<Vec<Ban>>pub async fn active_values(pool: &SqlitePool) -> AppResult<Vec<String>>pub async fn add(pub async fn set_active(pub async fn delete(pub async fn set_active_for_value(pub async fn ensure_active_address_ban(pub async fn sync_policy_files(pool: &SqlitePool, config: &Config) -> AppResult<()>render_ban_files(bans:
Section titled “render_ban_files(bans:”pub fn render_ban_files(bans: &[Ban]) -> (String, String, String)LogSource
Section titled “LogSource”pub struct LogSourceusers_list_command()
Section titled “users_list_command()”pub fn users_list_command() -> Vec<String>user_size_command(address:
Section titled “user_size_command(address:”pub fn user_size_command(address: &str) -> Vec<String>user_message_count_command(address:
Section titled “user_message_count_command(address:”pub fn user_message_count_command(address: &str) -> Vec<String>user_mailbox_create_command(address:
Section titled “user_mailbox_create_command(address:”pub fn user_mailbox_create_command(address: &str, mailbox: &str) -> Vec<String>user_metadata_command(address:
Section titled “user_metadata_command(address:”pub fn user_metadata_command(address: &str) -> Vec<String>user_delete_mailbox_command(address:
Section titled “user_delete_mailbox_command(address:”pub fn user_delete_mailbox_command(address: &str) -> Vec<String>user_kick_command(address:
Section titled “user_kick_command(address:”pub fn user_kick_command(address: &str) -> Vec<String>user_home_command(address:
Section titled “user_home_command(address:”pub fn user_home_command(address: &str) -> Vec<String>user_auth_test_command(address:
Section titled “user_auth_test_command(address:”pub fn user_auth_test_command(address: &str, password: &str) -> Vec<String>user_mailbox_list_command(address:
Section titled “user_mailbox_list_command(address:”pub fn user_mailbox_list_command(address: &str) -> Vec<String>user_mailbox_expunge_command(address:
Section titled “user_mailbox_expunge_command(address:”pub fn user_mailbox_expunge_command(address: &str, mailbox: &str) -> Vec<String>user_quota_recalc_command(address:
Section titled “user_quota_recalc_command(address:”pub fn user_quota_recalc_command(address: &str) -> Vec<String>user_force_resync_command(address:
Section titled “user_force_resync_command(address:”pub fn user_force_resync_command(address: &str) -> Vec<String>password_hash_command(password:
Section titled “password_hash_command(password:”pub fn password_hash_command(password: &str) -> Vec<String>bans_reload_commands()
Section titled “bans_reload_commands()”pub fn bans_reload_commands() -> Vec<Vec<String>>systemctl_command(action:
Section titled “systemctl_command(action:”pub fn systemctl_command(action: &str, unit: &str) -> Vec<String>log_source_by_name(name:
Section titled “log_source_by_name(name:”pub fn log_source_by_name(name: Option<&str>) -> LogSourceConfig
Section titled “Config”pub struct ConfigServerConfig
Section titled “ServerConfig”pub struct ServerConfigAuthConfig
Section titled “AuthConfig”pub struct AuthConfigBansConfig
Section titled “BansConfig”pub struct BansConfigSettingsConfig
Section titled “SettingsConfig”pub struct SettingsConfigInvitesConfig
Section titled “InvitesConfig”pub struct InvitesConfigHealthConfig
Section titled “HealthConfig”pub struct HealthConfigpub async fn connect(database_url: &str) -> AppResult<SqlitePool>AppError
Section titled “AppError”pub enum AppErrorHealthCheck
Section titled “HealthCheck”pub struct HealthCheckpub async fn run_health_checks(shell: &Shell, config: &Config) -> Vec<HealthCheck>Invite
Section titled “Invite”pub struct Invitegenerate_token()
Section titled “generate_token()”pub fn generate_token() -> Stringpub async fn list(pool: &SqlitePool) -> AppResult<Vec<Invite>>pub async fn create(pub async fn set_active(pub async fn export_active_tokens(pool: &SqlitePool, config: &Config) -> AppResult<()>LogLine
Section titled “LogLine”pub struct LogLinepub async fn read_logs(pub async fn read_journal_unit(pub async fn read_journal_identifiers(AppState
Section titled “AppState”pub struct AppStatePolicySyncResult
Section titled “PolicySyncResult”pub struct PolicySyncResultpub async fn ensure_ban_policy(shell: &Shell, config: &Config) -> AppResult<PolicySyncResult>pub async fn request_id_middleware(mut request: Request<Body>, next: Next) -> Responserouter()
Section titled “router()”pub fn router() -> Router<AppState>router()
Section titled “router()”pub fn router() -> Router<AppState>router()
Section titled “router()”pub fn router() -> Router<AppState>router()
Section titled “router()”pub fn router() -> Router<AppState>router()
Section titled “router()”pub fn router() -> Router<AppState>router()
Section titled “router()”pub fn router() -> Router<AppState>router()
Section titled “router()”pub fn router() -> Router<AppState>router()
Section titled “router()”pub fn router() -> Router<crate::AppState>router()
Section titled “router()”pub fn router() -> Router<AppState>router()
Section titled “router()”pub fn router() -> Router<AppState>router()
Section titled “router()”pub fn router() -> Router<AppState>ServiceStatus
Section titled “ServiceStatus”pub struct ServiceStatusDashboardStats
Section titled “DashboardStats”pub struct DashboardStatsServiceActionResult
Section titled “ServiceActionResult”pub struct ServiceActionResultpub async fn collect_dashboard_stats(pub async fn run_service_action(SettingRow
Section titled “SettingRow”pub struct SettingRowRegistrationSettings
Section titled “RegistrationSettings”pub struct RegistrationSettingspub async fn load(pool: &SqlitePool) -> AppResult<RegistrationSettings>pub async fn save(pub async fn generate_policy_file(CommandOutput
Section titled “CommandOutput”pub struct CommandOutputpub struct Shellsubstitute_template_args(
Section titled “substitute_template_args(”pub fn substitute_template_args(command_result_details(output:
Section titled “command_result_details(output:”pub fn command_result_details(output: &CommandOutput) -> Valuepub async fn write_text_file(path: &str, content: &str) -> AppResult<()>pub async fn run_reload_commands(UserMailbox
Section titled “UserMailbox”pub struct UserMailboxManagedUser
Section titled “ManagedUser”pub struct ManagedUserpub async fn create_user_account(pub async fn list_users(shell: &Shell, blocked_values: &[String]) -> Vec<UserMailbox>pub async fn load_managed_user(shell: &Shell, address: &str) -> AppResult<ManagedUser>pub async fn delete_mailbox(shell: &Shell, address: &str) -> AppResult<CommandOutput>pub async fn disable_login(shell: &Shell, address: &str) -> AppResult<String>pub async fn enable_login(shell: &Shell, address: &str) -> AppResult<String>pub async fn delete_account_lifecycle(shell: &Shell, address: &str) -> AppResult<String>pub async fn expunge_mailbox(pub async fn quota_recalc(shell: &Shell, address: &str) -> AppResult<CommandOutput>pub async fn force_resync(shell: &Shell, address: &str) -> AppResult<CommandOutput>