type.inbound
and (
strings.ilike(sender.display_name, '*venmo*')
or strings.ilevenshtein(sender.display_name, 'venmo') <= 1
)
and sender.email.domain.root_domain not in~ (
'venmo.com',
'synchronybank.com',
'venmocreditsurvey.com',
'venmo-experience.com',
'synchrony.com'
)
// and not if the sender.display.name contains "via" and dmarc pass from venmo.com
and not (
(
headers.auth_summary.dmarc.pass
and headers.auth_summary.dmarc.details.from.root_domain == "venmo.com"
)
and strings.contains(sender.display_name, "via")
)
// 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
)
// and no false positives and not solicited
and (
not profile.by_sender().any_messages_benign
and not profile.by_sender().solicited
)
Playground
Test against your own EMLs or sample data.