Masked email: owners send as their live masks, over JMAP identities and SMTP submission (ME-11)

This commit is contained in:
2026-09-18 16:23:49 -07:00
parent 60d1d8b84a
commit 53ccc8f4de
4 changed files with 31 additions and 0 deletions
+1
View File
@@ -18,6 +18,7 @@ directory = { path = "../directory" }
common = { path = "../common" }
email = { path = "../email" }
registry = { path = "../registry" }
inbuxa-features = { path = "../features" }
spam-filter = { path = "../spam-filter" }
trc = { path = "../trc" }
mail-auth = { version = "0.13", features = ["rkyv"] }
+9
View File
@@ -248,6 +248,15 @@ impl<T: SessionStream> Session<T> {
.authenticated_emails()
.iter()
.any(|e| e == address_lcase)
// inbuxa: ME-11: the sender's own live masks are its addresses too
&& !inbuxa_features::masked_email::ops::sends_as(
&self.server.core.storage.data,
self.server.registry(),
self.data.authenticated_as.as_ref().unwrap().account_id,
address_lcase,
)
.await
.unwrap_or(false)
{
trc::event!(
Smtp(SmtpEvent::MailFromUnauthorized),