From f67f04129afaacc4cdeb69aa79e5c102ec7331bd Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Tue, 23 Jan 2024 16:14:58 +0100 Subject: Add TLS support --- src/config.rs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'src/config.rs') diff --git a/src/config.rs b/src/config.rs index b9c1f09..0269773 100644 --- a/src/config.rs +++ b/src/config.rs @@ -9,7 +9,7 @@ use serde::{Deserialize, Serialize}; #[derive(Serialize, Deserialize, Debug, Clone)] pub struct CompanionConfig { pub pid: Option, - pub imap: ImapConfig, + pub imap: ImapUnsecureConfig, #[serde(flatten)] pub users: LoginStaticConfig, @@ -18,8 +18,9 @@ pub struct CompanionConfig { #[derive(Serialize, Deserialize, Debug, Clone)] pub struct ProviderConfig { pub pid: Option, - pub imap: ImapConfig, - pub lmtp: LmtpConfig, + pub imap: Option, + pub imap_unsecure: Option, + pub lmtp: Option, pub users: UserManagement, } @@ -40,6 +41,13 @@ pub struct LmtpConfig { #[derive(Serialize, Deserialize, Debug, Clone)] pub struct ImapConfig { pub bind_addr: SocketAddr, + pub certs: PathBuf, + pub key: PathBuf, +} + +#[derive(Serialize, Deserialize, Debug, Clone)] +pub struct ImapUnsecureConfig { + pub bind_addr: SocketAddr, } #[derive(Serialize, Deserialize, Debug, Clone)] -- cgit v1.2.3 From 9a265a09e24f6bebf6a6e327da5dd9dfd4dfa866 Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Tue, 23 Jan 2024 21:09:57 +0100 Subject: WIP Dovecot Authentication Protocol Server --- src/config.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/config.rs') diff --git a/src/config.rs b/src/config.rs index 0269773..faaa1ba 100644 --- a/src/config.rs +++ b/src/config.rs @@ -21,6 +21,7 @@ pub struct ProviderConfig { pub imap: Option, pub imap_unsecure: Option, pub lmtp: Option, + pub auth: Option, pub users: UserManagement, } @@ -32,6 +33,11 @@ pub enum UserManagement { Ldap(LoginLdapConfig), } +#[derive(Serialize, Deserialize, Debug, Clone)] +pub struct AuthConfig { + pub bind_addr: SocketAddr, +} + #[derive(Serialize, Deserialize, Debug, Clone)] pub struct LmtpConfig { pub bind_addr: SocketAddr, -- cgit v1.2.3