type.inbound
and any(filter(attachments, .file_type == "pdf"),
any(file.explode(.),
any(.scan.yara.matches,
.name == "pdf_generic_msft_compensation_lure"
)
)
)
Playground
Test against your own EMLs or sample data.