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
+7
View File
@@ -116,6 +116,9 @@ impl Permission {
/// Authorization requires checking access to the target account_id.
pub const DATA_IMPORT_BATCH: &str = "data:import:batch";
/// Allow SMTP ingestion into SPECIFIC accounts.
pub const DATA_SMTP_INGEST: &str = "data:smtp:ingest";
pub fn global_permissions() -> Vec<(&'static str, &'static str)> {
vec![
(
@@ -194,6 +197,10 @@ impl Permission {
Self::DATA_IMPORT_BATCH,
"Import external EML/PST data into authorized accounts.",
),
(
Self::DATA_SMTP_INGEST,
"Receive and archive emails via SMTP for authorized accounts.",
),
]
}