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:
@@ -421,6 +421,17 @@ impl AccountV4 {
|
||||
list_all_impl(DB_MANAGER.meta_db()).await
|
||||
}
|
||||
|
||||
pub async fn find_by_email(email: &str) -> BichonResult<Option<AccountModel>> {
|
||||
let all: Vec<AccountModel> = list_all_impl(DB_MANAGER.meta_db()).await?;
|
||||
let target_email = email.trim().to_lowercase();
|
||||
|
||||
let first_match = all
|
||||
.into_iter()
|
||||
.find(|acc| acc.email.to_lowercase() == target_email);
|
||||
|
||||
Ok(first_match)
|
||||
}
|
||||
|
||||
pub async fn minimal_list(only_nosync: bool) -> BichonResult<Vec<MinimalAccount>> {
|
||||
let result = list_all_impl(DB_MANAGER.meta_db())
|
||||
.await?
|
||||
|
||||
Reference in New Issue
Block a user