aboutsummaryrefslogtreecommitdiff
path: root/src/config.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2022-05-31 15:49:10 +0200
committerAlex Auvolat <alex@adnab.me>2022-05-31 15:49:10 +0200
commit01d82c14ca61e7c4de1e72c5f94456610464c064 (patch)
tree20ada5789d449182e18c3a18751ffd0473486614 /src/config.rs
parentd53cf1d220ef08c0b9368cfe91bee7660b7f5a3b (diff)
downloadaerogramme-01d82c14ca61e7c4de1e72c5f94456610464c064.tar.gz
aerogramme-01d82c14ca61e7c4de1e72c5f94456610464c064.zip
UUID generator; import kannader smtp server
Diffstat (limited to 'src/config.rs')
-rw-r--r--src/config.rs8
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)