mirror of
https://github.com/chatmail/relay.git
synced 2026-09-21 06:40:09 +00:00
perf: Use governor for rate limiting (#20)
Fixes: #19 Signed-off-by: Jagoda Ślązak <jslazak@jslazak.com>
This commit is contained in:
committed by
GitHub
parent
06b7b0ca6d
commit
b5a56a6a4e
@@ -1,6 +1,7 @@
|
||||
//! Configuration file handling for filtermail.
|
||||
|
||||
use serde::{Deserialize, Deserializer};
|
||||
use std::num::NonZeroU32;
|
||||
use std::path::{Path, PathBuf};
|
||||
|
||||
/// Chatmail configuration subset used by filtermail.
|
||||
@@ -16,7 +17,7 @@ pub struct Config {
|
||||
pub postfix_reinject_port_incoming: u16,
|
||||
#[serde(default = "Config::default_max_message_size")]
|
||||
pub max_message_size: usize,
|
||||
pub max_user_send_per_minute: usize,
|
||||
pub max_user_send_per_minute: NonZeroU32,
|
||||
#[serde(default, deserialize_with = "deserialize_sequence")]
|
||||
pub passthrough_senders: Vec<String>,
|
||||
#[serde(default, deserialize_with = "deserialize_sequence")]
|
||||
|
||||
Reference in New Issue
Block a user