type.inbound
and any(attachments,
.file_extension == "pdf"
// observed producer
and any(file.explode(.), .scan.exiftool.producer == "Soda PDF")
and any(file.explode(.),
// OCR contains "encryption" themes
(
strings.icontains(.scan.ocr.raw, "has been encrypted")
or strings.icontains(.scan.ocr.raw, "encrypted pdf file")
or strings.icontains(.scan.ocr.raw, "is secured by")
)
// mentions a PDF
and strings.contains(.scan.ocr.raw, "PDF")
)
)
Playground
Test against your own EMLs or sample data.