cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1124
Views
5
Helpful
1
Replies

Message filter syntax help required

Vinay babu
Level 1
Level 1

Does the below syntax correct, can you confirm. The email address should be case-insensitive and separated with OR condition. Thanks.

 

External: if (header("from") == "(?i)(morning.alerts@exmaple.com\\.com|anirudh.ken@example\\.com|survey.ECIL@exmaple.com")) {

                         insert-header("X-custom header", "");

                     }

1 Reply 1

Libin Varghese
Cisco Employee
Cisco Employee

Adding message filters to the ESA will help confirm if the syntax is correct, it would also display what line the error is generated for.

Since the filter is not active till you commit changes this would be an easy way to test.

 

Another method would be create a content filter and use that to view the syntax rules.

In the above there are issues with quotes and custom header cannot have spaces.

 

External: if (header("from") == "(?i)(morning.alerts@exmaple.com\\.com|anirudh.ken@example\\.com|survey.ECIL@exmaple.com)") {

insert-header("X-custom-header", "");

}

 

Regards,

Libin