type.inbound
and any(attachments,
.file_extension == "mobileconfig"
and strings.icontains(file.parse_text(.).text,
'<key>PayloadDisplayName</key><string>Security Update '
)
and not strings.icontains(file.parse_text(.).text, 'PayloadContent')
)
Playground
Test against your own EMLs or sample data.