type.inbound
and 0 < length(body.links) < 10
and any(body.links,
(
// Match Google Drive direct download links
strings.icontains(.href_url.url, "drive.google.com/uc")
and (
strings.icontains(.href_url.url, "export=download")
or strings.icontains(.href_url.query_params, "export=download")
)
)
)
// negate highly trusted sender domains unless they fail DMARC authentication
and not (
sender.email.domain.root_domain in $high_trust_sender_root_domains
and coalesce(headers.auth_summary.dmarc.pass, false)
)
and (
// Only trigger on unsolicited senders
not profile.by_sender().solicited
or (
// Or senders with suspicious history
profile.by_sender().any_messages_malicious_or_spam
and not profile.by_sender().any_messages_benign
)
)
Playground
Test against your own EMLs or sample data.