type.inbound
and any(body.links,
.href_url.domain.domain == "confidential-mail.google.com"
and strings.istarts_with(.href_url.path, "/msg/")
)
and (
(
profile.by_sender_email().prevalence in ("new", "outlier")
and not profile.by_sender_email().solicited
)
or (
profile.by_sender_email().any_messages_malicious_or_spam
and not profile.by_sender_email().any_messages_benign
)
)
Playground
Test against your own EMLs or sample data.