Hello
Carl-Johan Larsson,
As of cPanel's last knowledge update regarding email Filters, in September 2021 & July 2022, cPanel itself doesn't offer built-in features for filtering emails based on the content on attachments.
Email Filters
Configure Email Filters
Other than that, you can create a custom filter rule file, this might would be helpful for you.
Customize the Exim System Filter File
There is no direct "has attachment" filter option, however there will be information in the headers that might get the attachment's name filter job done. Try it.
1. This would catch every email with any type of attachment. But be warned, that includes signature images and a host of other benign files. The better option is to filter out specific types of attachments.
Body - Contains
Content-Disposition: attachment;
2. Would catch anything with a .zip file attachment.
Body - Contains
Content-Type: application/zip;
OR
Body - Contains
Content-Disposition: attachment;
AND
Body - Contains
.zip