Message filter syntax help required
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2021 01:24 PM
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", "");
}
- Labels:
-
Email Security
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-08-2021 10:08 PM
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
