Enable the
filters labs feature
and import these into GMail:
gmail-attachment-filters.xml