Fixed account creation

This commit is contained in:
mdecimus
2023-12-26 11:17:22 +01:00
parent 7ea3460469
commit bb760bc1f9
7 changed files with 65 additions and 28 deletions

View File

@@ -45,6 +45,17 @@ static GLOBAL: Jemalloc = Jemalloc;
#[tokio::main]
async fn main() -> std::io::Result<()> {
let config = Config::init();
// Enable tracing
let _tracer = enable_tracing(
&config,
&format!(
"Starting Stalwart Mail Server v{}...",
env!("CARGO_PKG_VERSION"),
),
)
.failed("Failed to enable tracing");
let servers = config.parse_servers().failed("Invalid configuration");
let stores = config.parse_stores().await.failed("Invalid configuration");
let directory = config
@@ -63,16 +74,6 @@ async fn main() -> std::io::Result<()> {
// Bind ports and drop privileges
servers.bind(&config);
// Enable tracing
let _tracer = enable_tracing(
&config,
&format!(
"Starting Stalwart Mail Server v{}...",
env!("CARGO_PKG_VERSION"),
),
)
.failed("Failed to enable tracing");
// Init servers
let (delivery_tx, delivery_rx) = mpsc::channel(IPC_CHANNEL_BUFFER);
let smtp = SMTP::init(&config, &servers, &stores, &directory, delivery_tx)