mirror of
https://github.com/rustmailer/bichon.git
synced 2026-08-03 07:48:34 +02:00
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user