type.inbound
and length(attachments) > 0
and all(attachments, .content_type in ("text/calendar", "application/ics"))
and any(attachments,
// extract the calendar invite description and use NLU against it
any(file.explode(.),
any(.scan.ics.calendars,
any(.components,
any(ml.nlu_classifier(.description).intents,
.name == "callback_scam"
)
)
)
)
)
and (
not profile.by_sender_email().solicited
and not profile.by_sender_email().any_messages_benign
)
// negate highly trusted sender domains unless they fail DMARC authentication
and (
(
sender.email.domain.root_domain in $high_trust_sender_root_domains
and not headers.auth_summary.dmarc.pass
)
or sender.email.domain.root_domain not in $high_trust_sender_root_domains
)
Playground
Test against your own EMLs or sample data.