diff options
Diffstat (limited to 'src/config.rs')
-rw-r--r-- | src/config.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/config.rs b/src/config.rs index a1de5ba..3fd0bd4 100644 --- a/src/config.rs +++ b/src/config.rs @@ -1,5 +1,6 @@ use std::collections::HashMap; use std::io::Read; +use std::net::SocketAddr; use std::path::PathBuf; use anyhow::Result; @@ -13,6 +14,8 @@ pub struct Config { pub login_static: Option<LoginStaticConfig>, pub login_ldap: Option<LoginLdapConfig>, + + pub lmtp: Option<LmtpConfig>, } #[derive(Deserialize, Debug, Clone)] @@ -62,6 +65,11 @@ pub struct LoginLdapConfig { pub bucket_attr: Option<String>, } +#[derive(Deserialize, Debug, Clone)] +pub struct LmtpConfig { + pub bind_addr: SocketAddr, +} + pub fn read_config(config_file: PathBuf) -> Result<Config> { let mut file = std::fs::OpenOptions::new() .read(true) |