diff options
author | Quentin Dufour <quentin@deuxfleurs.fr> | 2024-03-13 15:45:36 +0100 |
---|---|---|
committer | Quentin Dufour <quentin@deuxfleurs.fr> | 2024-03-13 15:45:36 +0100 |
commit | 3abdafb0dbbc9290329e4974e821933426b32f91 (patch) | |
tree | f09e14393c5e1b82ba5788a8ce09b2270b72668d /aerogramme | |
parent | 98adb1e20d90a1538b474659a96450d4c7b264c5 (diff) | |
download | aerogramme-3abdafb0dbbc9290329e4974e821933426b32f91.tar.gz aerogramme-3abdafb0dbbc9290329e4974e821933426b32f91.zip |
TLS + Fix auth
Diffstat (limited to 'aerogramme')
-rw-r--r-- | aerogramme/src/main.rs | 1 | ||||
-rw-r--r-- | aerogramme/src/server.rs | 13 |
2 files changed, 14 insertions, 0 deletions
diff --git a/aerogramme/src/main.rs b/aerogramme/src/main.rs index 4251520..624e8e2 100644 --- a/aerogramme/src/main.rs +++ b/aerogramme/src/main.rs @@ -171,6 +171,7 @@ async fn main() -> Result<()> { AnyConfig::Provider(ProviderConfig { pid: None, imap: None, + dav: None, imap_unsecure: Some(ImapUnsecureConfig { bind_addr: SocketAddr::new(IpAddr::V6(Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 1)), 1143), }), diff --git a/aerogramme/src/server.rs b/aerogramme/src/server.rs index e302db3..e57cd72 100644 --- a/aerogramme/src/server.rs +++ b/aerogramme/src/server.rs @@ -21,6 +21,7 @@ pub struct Server { imap_server: Option<imap::Server>, auth_server: Option<auth::AuthServer>, dav_unsecure_server: Option<dav::Server>, + dav_server: Option<dav::Server>, pid_file: Option<PathBuf>, } @@ -37,6 +38,7 @@ impl Server { imap_server: None, auth_server: None, dav_unsecure_server: None, + dav_server: None, pid_file: config.pid, }) } @@ -63,12 +65,17 @@ impl Server { let dav_unsecure_server = config .dav_unsecure .map(|dav_config| dav::new_unsecure(dav_config, login.clone())); + let dav_server = config + .dav + .map(|dav_config| dav::new(dav_config, login.clone())) + .transpose()?; Ok(Self { lmtp_server, imap_unsecure_server, imap_server, dav_unsecure_server, + dav_server, auth_server, pid_file: config.pid, }) @@ -125,6 +132,12 @@ impl Server { None => Ok(()), Some(s) => s.run(exit_signal.clone()).await, } + }, + async { + match self.dav_server { + None => Ok(()), + Some(s) => s.run(exit_signal.clone()).await, + } } )?; |