cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
394
Views
0
Helpful
0
Replies

Filtering attachments based on multiple criterias via message filters

tbskmn
Level 1
Level 1

Hello,

is there a way to create filter rules that can handle multiple attachment-criterias?

Example:

If we want to create a rule that does specific things to emails with ".txt"-files which contain a specific string we would create something like the following message filter:

myAttachmentFilter:
if attachment-filename == "(?i)\\.txt$" {
    if attachment-binary-contains("sampleString") {
        doSomeActions;
    }
}

 But if we configure this, that does not work as we would expect:

It would "doSomeActions;" for more emails than we would like:
e.g. an email with two attachments:

  1. myFile.txt
  2. myOtherFile.ical (containing the text "sampleString")

What we want is a rule, that can check multiple criterias for one attachment, not criterias on all attachments.
Connecting the rules with an "AND" does not do the trick aswell.

Thank you for your ideas!

0 Replies 0