feat(smtp): implement built-in SMTP server for mail ingestion

- Add lightweight SMTP server support using `lettre` and `tokio`.
- Implement `DATA_SMTP_INGEST` permission check for inbound mail.
- Support real-time email archiving via SMTP protocol.
- Integrate with existing EML index manager for automated indexing.
This commit is contained in:
rustmailer
2026-03-10 01:25:02 +08:00
parent 16f0fad91e
commit 4b0d571cf2
38 changed files with 1609 additions and 32 deletions
+15
View File
@@ -61,6 +61,21 @@ pub fn extract_envelope_from_eml(
)
}
pub fn extract_envelope_from_smtp(
body: &[u8],
account_id: u64,
mailbox_id: u64,
) -> BichonResult<(Envelope, Vec<AttachmentInfo>)> {
extract_envelope_core(
body,
0,
body.len() as u32,
utc_now!(),
account_id,
mailbox_id,
)
}
fn extract_envelope_core(
body: &[u8],
uid: u32,