type.inbound
and any(filter(body.links,
strings.icontains(.href_url.domain.root_domain, "mimecast")
and strings.starts_with(.href_url.path, "/r/")
),
length(.href_url.path) > 2000
)
Playground
Test against your own EMLs or sample data.