Attachment filtering by content and name rules are available.
Attachment Duplication Filter
It is a common problem that with intensive email conversations the same content from email attachments (e.g. email signature images) are added the same issue polluting the relevant content.
Email This Issue's Attachment Duplication Filter functionality prevents this by making sure that the same attachment content will be added only once from emails.
The duplication is based on MD5 Hashes calculated from the attachments' binary content.
If an Attachment Size Threshold is set in this page, then files being larger than the Threshold will not be filtered by duplication to avoid the overhead of calculating MD5 hashes for large files.
Duplication check is not applied to attachments uploaded explicitly via the Jira UI.
MD5 Hashes - Filter by Content
MD5 fingerprints are used to exclude attachments from being added from emails. Email This Issue Mail Handler extracts attachmens from the incoming emails it processes and attaches them to the issue.
You can upload fingerprints to exclude certain attachments. If the md5 fingerprint of an attachment extracted from the email matches one of the existing fingerprints, it will not be attached to the issue.
This is useful if you do not want email signature image attachments to be uploaded to each and every issue.
Files larger than the configured attachment size threshold will skip md5 generation and matching to minimize computation overhead.
Files can be uploaded to add their fingerprint or you can generate md5 online and save it with a descriptive name.
Save Images from Email
Email clients like Outlook alter (e.g. resize) the images embedded in the email body. Therefore the most reliable way to apply the MD5 filtering is to follow the steps:
- Get an email that contains the image you want to filter out.
- Save the image right from the email (right click on the image and save as)
- Upload the image saved from email to the MD5 page in email this issue.
This way you can make sure that the image is filtered properly. Do not upload the original image because it will be a different stream of bytes resulting in different MD5 hash value.
Exclusions - Filter by Name
Attachments may filtered out by regular expressions (see java regex documentation and a test page) matching the name of the files. Add name exclusion patterns in the Attachment Filtering page. Attachments whose name matches either of the expressions added, will not be attached to the issues.
To make your regex case-insensitive you have to use (?i) before your filter.
|Regex||matches||not match with|
Filter by File Type and File Size
File type and size combined filters help you phrase filters that check both the attachment's file type and its file size. Attachments matching the type setting in the filter and are smaller in size than the value specified in the filter, are not added to the issue.
- Mime-type regular expression: a regex that is matched against the file's mime type. Regex makes it easy to match all image types or any other file types with a single entry
- Max file size (KB): files smaller than this value will not be added to the issues if their type matches the corresponding regex