Filtering by attachment type

Hello. I would like to prevent mails with potentially hazardous attachments (in this case DOC and XLS format) to be filtered out and answered with a reply saying that only DOCX and XLSX are accepted.

However, I did not find a way to do it. Any hints ?
Thanks !