diff options
author | Quentin Dufour <quentin@deuxfleurs.fr> | 2024-01-23 16:14:58 +0100 |
---|---|---|
committer | Quentin Dufour <quentin@deuxfleurs.fr> | 2024-01-23 16:14:58 +0100 |
commit | f67f04129afaacc4cdeb69aa79e5c102ec7331bd (patch) | |
tree | edc58834760b2822f880f614ef823dc1dbec405d /src/config.rs | |
parent | 1f449dc7e97db34c4aa4cf08eb7cc6269905709f (diff) | |
download | aerogramme-f67f04129afaacc4cdeb69aa79e5c102ec7331bd.tar.gz aerogramme-f67f04129afaacc4cdeb69aa79e5c102ec7331bd.zip |
Add TLS support
Diffstat (limited to 'src/config.rs')
-rw-r--r-- | src/config.rs | 14 |
1 files changed, 11 insertions, 3 deletions
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<PathBuf>, - 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<PathBuf>, - pub imap: ImapConfig, - pub lmtp: LmtpConfig, + pub imap: Option<ImapConfig>, + pub imap_unsecure: Option<ImapUnsecureConfig>, + pub lmtp: Option<LmtpConfig>, 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)] |