02-03-2025 12:46 AM
Hi everyone,
Is there a way to filter based on recipients in a Incoming mail policy group with a message filter?
For example, If i have two different Mail Policy Groups ("x" and "y") and i only want to apply actions with a message filter for recipients that are present in the incoming mail policy "x".
Unfortunately, I haven't found any message filter rule in the message filters, content filters or any other settings.
Solved! Go to Solution.
02-03-2025 10:54 AM
Mail Policy Groups? Do you mean Sender Group under Mail Policies/HAT Overview?
or do you mean Incoming Mail Policies?
For the first Message Filters (in the CLI) have a test for sendergroup. (FYI this happens BEFORE you get to Mail Policies)
If its the second, in the boxed circled, click on the text there and enable the content filters you need, no need to "test" for which policy, that's part of how the policy engine works.
Something that's useful:
I have a message filter that adds a set of headers that makes using some of that info easier (mainly because I'm shipping mail to ETD which requires a couple of those things)
addHeaders: if sendergroup != "RELAYLIST" {
insert-header("X-IronPort-RemoteIP", "$RemoteIP");
insert-header("X-IronPort-MID", "$MID");
insert-header("X-IronPort-Reputation", "$Reputation");
insert-header("X-IronPort-Listener", "$RecvListener");
insert-header("X-IronPort-SenderGroup", "$Group");
insert-header("X-IronPort-MailFlowPolicy", "$Policy");
}
02-03-2025 10:37 AM
You assign content filters to polices, so you can do what you are looking for.
Create a content filter for the action you want to take on group X. In the policy, I'm guessing content filters say (use default) this should be clickable and at the top change the drop down from enable use default to enable custom and now you can select what content filters apply to that policy.
02-03-2025 10:54 AM
Mail Policy Groups? Do you mean Sender Group under Mail Policies/HAT Overview?
or do you mean Incoming Mail Policies?
For the first Message Filters (in the CLI) have a test for sendergroup. (FYI this happens BEFORE you get to Mail Policies)
If its the second, in the boxed circled, click on the text there and enable the content filters you need, no need to "test" for which policy, that's part of how the policy engine works.
Something that's useful:
I have a message filter that adds a set of headers that makes using some of that info easier (mainly because I'm shipping mail to ETD which requires a couple of those things)
addHeaders: if sendergroup != "RELAYLIST" {
insert-header("X-IronPort-RemoteIP", "$RemoteIP");
insert-header("X-IronPort-MID", "$MID");
insert-header("X-IronPort-Reputation", "$Reputation");
insert-header("X-IronPort-Listener", "$RecvListener");
insert-header("X-IronPort-SenderGroup", "$Group");
insert-header("X-IronPort-MailFlowPolicy", "$Policy");
}
02-05-2025 01:01 AM
Hello, @Ken Stieers
thanks for your response.
I apologize for asking such a dumb question in the first place, but I appreciate your helpful advice regarding the message filter.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide