CleanupEvent

Enum CleanupEvent 

Source
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事件

Fields

§queue_id: String
§message_id: String
§

QueueFileWarning

队列文件操作警告

Fields

§operation: String
§file_path: String
§error_reason: String
§

MessageRewrite

邮件内容重写 cleanup可能会重写邮件头、地址等

Fields

§queue_id: String
§rewrite_type: String
§original: String
§rewritten: String
§

MessageSize

邮件大小信息 cleanup处理邮件时会记录大小信息

Fields

§queue_id: String
§size: u64
§

HeaderProcessing

邮件头处理 cleanup处理各种邮件头

Fields

§queue_id: String
§header_name: String
§header_value: String
§action: String
§

FilterAction

邮件过滤器处理 与milter等过滤器交互的事件

Fields

§queue_id: String
§filter_name: String
§action: String
§details: Option<String>
§

AddressRewrite

地址重写 cleanup可能重写发件人或收件人地址

Fields

§queue_id: String
§address_type: String
§original_address: String
§rewritten_address: String
§

MessageReject

邮件拒绝 cleanup阶段的邮件拒绝

Fields

§queue_id: String
§reason: String
§action: String
§

ResourceLimit

资源限制警告 磁盘空间、内存等资源限制

Fields

§resource_type: String
§limit_details: String
§current_value: Option<u64>
§limit_value: Option<u64>
§

MilterInteraction

Milter交互 与邮件过滤器的交互事件

Fields

§queue_id: String
§milter_name: String
§command: String
§response: Option<String>
§

ConfigurationWarning

配置警告 cleanup相关的配置问题

Fields

§warning_type: String
§message: String
§

Statistics

统计信息 cleanup处理统计

Fields

§processed: Option<u32>
§rejected: Option<u32>
§errors: Option<u32>
§

SnowflakeInit

Snowflake ID生成器初始化 记录唯一ID生成器的初始化配置

Fields

§node_id: u32
§node_bits: u32
§seq_bits: u32
§

MessageHold

邮件隔离/保留事件 当邮件被隔离或保留时记录的事件

Fields

§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>
§description: String
§

MessageDiscard

邮件丢弃事件 当邮件被丢弃时记录的事件

Fields

§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>
§description: String
§

MessageRemoved

邮件移除事件 当邮件从队列中被移除时记录的事件

Fields

§queue_id: String
§removal_reason: String
§details: Option<String>
§

Other

其他cleanup事件 用于处理暂时无法分类的cleanup事件

Fields

§event_type: String
§message: String
§queue_id: Option<String>

Implementations§

Source§

impl CleanupEvent

Source

pub fn event_type(&self) -> &'static str

Source

pub fn queue_id(&self) -> Option<&str>

获取队列ID(如果存在)

Source

pub fn is_error_event(&self) -> bool

检查是否为错误级别事件

Source

pub fn is_warning_event(&self) -> bool

检查是否为警告级别事件

Source

pub fn is_normal_event(&self) -> bool

检查是否为正常处理事件

Trait Implementations§

Source§

impl Clone for CleanupEvent

Source§

fn clone(&self) -> CleanupEvent

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CleanupEvent

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for CleanupEvent

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for CleanupEvent

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,