Block file extensions and MIME

Hello. I have 2 questions about content filter:

  1. Can i block in different filters different sets of file extensions?
  2. How can i block MIME-types?

Apparently Squidguard can do it using expressions, you should be able to configure it using a template custom.
More info here: http://www.squidguard.org/Doc/expressionlist.html
But I never tested.

You can do it with Squid, again another template custom is needed: