Here are some details on how to block by filetype using spamassassin.
Note to the OP - as per previous comments again this this will ONLY block attachments NAMED with an extension eg rtf|iso|img
Anyone mildly enterprising can just rename the file and it will pass regardless.
Unless a file can be pattern matched I don't think there is a "fast and easy" nor foolproof way of doing this (I don't disagree that it would be nice to be able to do it)
From earlier posts:
Sending iso's as an email-attachment is IMVHO just nonsense
It may well be. It doesn't making blocking them any easier....
Therefore spending time for an investigation in this case is not helpful
https://wiki.contribs.org/Qpsmtpd:exe_filterUnfortunately this method appears to use the same method as the virus filter - it looks for a MIME signature as illustrated above. It still requires patterns. It may also seriously stress your server with a very large file.
"exe_filter slurps the entire email into memory and uses Email::MIME to do the mime parsing, so it's reasonably memory hungry"So the point that janet made is you might have to roll up your sleeves and get your hands dirty and do some investigating and monitoring to start with and see if you can see any common file patterns, which is probably the most effective way of blocking attachments.
Some basic file patterns were suggested. You might need to test for more.
Whether or not there are some patterns that cover all eventualities, I don't know, but testing is the only way to find out and that would probably be your best route. From what I can see testing on a few ISOs (confirming what Warren said above) there doesn’t seem to be much in common so I don't think this is going to work. YMMV.
The simplest thing is, as suggested, just block attachments over a certain size (and again, use something like DL for anything larger). It is what we do here where he have a lot of large artwork files coming and going.
https://wiki.contribs.org/DownloadTicketServiceThe only issue is the Thunderbird plugin doesn't yet work with the latest Thunderbird 0.60.x, but hopefully will before long.
Personally I wish we could block all attachments, but hey ho. Such is life.