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