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

How do I create filter based on attachment or link in mail

Ian Fox
Level 1
Level 1

I am looking to create a content/message filter that will insert a disclaimer in a mail if the original mail contains an attachment or a URL link. How can I do that?

2 Replies 2

Mathew Huynh
Cisco Employee
Cisco Employee

Hello Ian,

The ESA does not have a feature to check if an attachment exists or not, so we'll need to run a scanner to look for a '.' within attachment names (or another character, or a range if you will) -> [a-z]

You can do this requirement by the following:

Content filter:

Create a new content filter

Condition -> attachment file name -> contains -> \.

Condition 2 -> Body contains -> (?i)(http|url|www)

Action:

Add Disclaimer

Then submit this filter for usage on your policies.

commit changes.

Message Filter:

CLI > filters > new

Syntax would be:

Add_Disclaimer:
if (attachment-filename == "\\.") OR (only-body-contains("(?i)(http|url|www)", 1))
{
add-footer("My_Footer");
}
.

press enter 2x

then commit changes

Regards,

Matthew

Thanks Matthew. That's what I thought but wanted confirmation.