//! Virtual虚拟投递模块
//!
//! 处理Postfix virtual投递代理的事件,包括虚拟域邮件投递和虚拟别名处理
use serde::{Deserialize, Serialize};
/// 虚拟投递组件事件
#[derive(Debug, Clone, Serialize, Deserialize)]
pub enum VirtualEvent {
/// 虚拟投递成功
Delivered {
to: String,
mailbox: String,
delay: String,
status: String,
},
}
impl VirtualEvent {
pub fn event_type(&self) -> &'static str {
match self {
VirtualEvent::Delivered { .. } => "delivered",
}
}
}