Restrict attachment size based on type

I am trying to create a rule, if mimetype!=="application/zip" and size >3000000 the file needs to be zipped. I tried doing a trigger, SL, fc in SYSATTACHMENTS. Whats the best way to do this?

Tags: