This document describes a solution to match on attachment file size in a filter condition.
On the Cisco Email Security Appliance (ESA), there is no option in Message Filters or Content Filters to match on attachment file size in a filter condition. The only size related condition is the Message Size condition, which is taking the size of the complete message into consideration.
The solution is to make use of the $filesizes Action Variable, which contains a comma separated list of the file size of all attachments contained in a message. If a X-header is added to the message with the value of $filesizes then a Regular Expression (RegEx) can be constructed to match if any of the contained numbers (file sizes) exceeds a certain value.
The example below shows the setup of a content filter that drops a message if the size of attachment(s) equals to or exceeds 10000 bytes:
Revision | Publish Date | Comments |
---|---|---|
1.0 |
13-Oct-2014 |
Initial Release |