feat: use fjall to store detached emails and attachments

This commit is contained in:
rustmailer
2026-04-01 04:49:18 +08:00
parent c123ecb24a
commit bd10e15c65
36 changed files with 569 additions and 1542 deletions
+2 -6
View File
@@ -32,13 +32,10 @@ use crate::{
since::{DateSince, RelativeDate},
state::AccountRunningState,
},
blob::{manager::ENVELOPE_INDEX_MANAGER, storage::BLOB_MANAGER},
cache::imap::mailbox::MailBox,
database::{list_all_impl, secondary_find_impl, with_transaction},
error::BichonResult,
indexer::{
attachment::ATTACHMENT_INDEX_MANAGER, eml::EML_INDEX_MANAGER,
manager::ENVELOPE_INDEX_MANAGER,
},
users::{role::DEFAULT_ACCOUNT_MANAGER_ROLE_ID, UserModel, DEFAULT_ADMIN_USER_ID},
},
utc_now,
@@ -365,8 +362,7 @@ impl AccountV4 {
let content_hashes = ENVELOPE_INDEX_MANAGER
.delete_account_envelopes(account.id)
.await?;
EML_INDEX_MANAGER.delete(&content_hashes).await?;
ATTACHMENT_INDEX_MANAGER.delete(&content_hashes).await?;
BLOB_MANAGER.delete(&content_hashes, &content_hashes)?;
Self::delete_account(account.id).await?;
info!("Sequential cleanup completed for account: {}", account.id);
Ok(())