pub enum CleanupEvent {
Show 17 variants
MessageId {
queue_id: String,
message_id: String,
},
QueueFileWarning {
operation: String,
file_path: String,
error_reason: String,
},
MessageRewrite {
queue_id: String,
rewrite_type: String,
original: String,
rewritten: String,
},
MessageSize {
queue_id: String,
size: u64,
},
HeaderProcessing {
queue_id: String,
header_name: String,
header_value: String,
action: String,
},
FilterAction {
queue_id: String,
filter_name: String,
action: String,
details: Option<String>,
},
AddressRewrite {
queue_id: String,
address_type: String,
original_address: String,
rewritten_address: String,
},
MessageReject {
queue_id: String,
reason: String,
action: String,
},
ResourceLimit {
resource_type: String,
limit_details: String,
current_value: Option<u64>,
limit_value: Option<u64>,
},
MilterInteraction {
queue_id: String,
milter_name: String,
command: String,
response: Option<String>,
},
ConfigurationWarning {
warning_type: String,
message: String,
},
Statistics {
processed: Option<u32>,
rejected: Option<u32>,
errors: Option<u32>,
},
SnowflakeInit {
node_id: u32,
node_bits: u32,
seq_bits: u32,
},
MessageHold {
queue_id: String,
hold_reason: String,
sender: Option<String>,
recipient: Option<String>,
client_ip: Option<String>,
client_hostname: Option<String>,
client_port: Option<u16>,
protocol: Option<String>,
helo: Option<String>,
description: String,
},
MessageDiscard {
queue_id: String,
discard_reason: String,
sender: Option<String>,
recipient: Option<String>,
client_ip: Option<String>,
client_hostname: Option<String>,
client_port: Option<u16>,
protocol: Option<String>,
helo: Option<String>,
description: String,
},
MessageRemoved {
queue_id: String,
removal_reason: String,
details: Option<String>,
},
Other {
event_type: String,
message: String,
queue_id: Option<String>,
},
}Expand description
Cleanup组件事件 基于896,788个真实生产数据分析,cleanup组件占4.5%的日志 cleanup主要负责邮件内容处理、重写和清理
Variants§
MessageId
Message-ID处理 - 最常见的cleanup事件
QueueFileWarning
队列文件操作警告
MessageRewrite
邮件内容重写 cleanup可能会重写邮件头、地址等
MessageSize
邮件大小信息 cleanup处理邮件时会记录大小信息
HeaderProcessing
邮件头处理 cleanup处理各种邮件头
FilterAction
邮件过滤器处理 与milter等过滤器交互的事件
AddressRewrite
地址重写 cleanup可能重写发件人或收件人地址
MessageReject
邮件拒绝 cleanup阶段的邮件拒绝
ResourceLimit
资源限制警告 磁盘空间、内存等资源限制
Fields
MilterInteraction
Milter交互 与邮件过滤器的交互事件
ConfigurationWarning
配置警告 cleanup相关的配置问题
Statistics
统计信息 cleanup处理统计
SnowflakeInit
Snowflake ID生成器初始化 记录唯一ID生成器的初始化配置
MessageHold
邮件隔离/保留事件 当邮件被隔离或保留时记录的事件
Fields
MessageDiscard
邮件丢弃事件 当邮件被丢弃时记录的事件
Fields
MessageRemoved
邮件移除事件 当邮件从队列中被移除时记录的事件
Other
其他cleanup事件 用于处理暂时无法分类的cleanup事件
Implementations§
Source§impl CleanupEvent
impl CleanupEvent
pub fn event_type(&self) -> &'static str
Sourcepub fn is_error_event(&self) -> bool
pub fn is_error_event(&self) -> bool
检查是否为错误级别事件
Sourcepub fn is_warning_event(&self) -> bool
pub fn is_warning_event(&self) -> bool
检查是否为警告级别事件
Sourcepub fn is_normal_event(&self) -> bool
pub fn is_normal_event(&self) -> bool
检查是否为正常处理事件
Trait Implementations§
Source§impl Clone for CleanupEvent
impl Clone for CleanupEvent
Source§fn clone(&self) -> CleanupEvent
fn clone(&self) -> CleanupEvent
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CleanupEvent
impl Debug for CleanupEvent
Source§impl<'de> Deserialize<'de> for CleanupEvent
impl<'de> Deserialize<'de> for CleanupEvent
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for CleanupEvent
impl RefUnwindSafe for CleanupEvent
impl Send for CleanupEvent
impl Sync for CleanupEvent
impl Unpin for CleanupEvent
impl UnwindSafe for CleanupEvent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more