diff options
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, + } } )?; |