AWS Security ChangesHomeSearch

AWS ses: Restructure Mail Manager rule sets page into concepts, examples, and topics

Service: ses · 2026-11-18 · Documentation low

File: ses/latest/dg/eb-rules.md

Summary

Rewrites the SES Mail Manager rule sets page: replaces the console step-by-step procedure and inline reference tables with conceptual explanations of how rule sets process email (conditions, Unless conditions, ordered actions), a recipient-routing example, a goal-to-pattern table linking to new example pages, and a topics list. Removes the IAM permission-policy setup steps, the ActionFailurePolicy note, and the recipient-address/subaddressing matching guidance (moved to other pages).

Security assessment

This is a documentation reorganization, not a fix for a specific vulnerability or incident. The new goal-to-pattern table documents a security best-practice pattern (isolating suspicious email by matching a security verdict, writing to S3, then dropping), and the removed content included IAM permission-policy setup steps and recipient-matching semantics, but no CVE, credential, or exposure issue is addressed.

Evidence

+Isolate suspicious email | [Isolate suspicious email](./eb-rules-examples.html#eb-rules-examples-isolate-suspicious) – Match a security result, write to Amazon S3, then drop.

Diff

diff --git a/ses/latest/dg/eb-rules.md b/ses/latest/dg/eb-rules.md
index c48875c..d8806d9 100644
--- a//ses/latest/dg/eb-rules.md
+++ b//ses/latest/dg/eb-rules.md
@@ -7 +7 @@
-Creating rule sets & rules (console)Rule conditions & actions
+How rule sets process emailRoute email by recipientChoose a rule-set patternRule conditions & actions
@@ -11 +11 @@ Creating rule sets & rules (console)Rule conditions & actions
-Rule sets are containers for rules that you assign to an ingress endpoint so that it can perform actions on email allowed in from the ingress endpoint's traffic policy. A rule set can be used by multiple ingress endpoints.
+After a traffic policy accepts an email, the ingress endpoint passes the email to its assigned rule set. A rule set is a reusable group of ordered rules that controls how Mail Manager processes accepted email. You can assign the same rule set to multiple ingress endpoints.
@@ -13 +13 @@ Rule sets are containers for rules that you assign to an ingress endpoint so tha
-Rules tell your ingress endpoint how to handle incoming email by executing the actions defined in the rule when messages meet the rule’s conditions. Each rule can have multiple conditions and actions. The rules you create within a rule set are executed in the order you specify within the rule set.
+Each rule can select email or individual recipients with conditions, skip its actions when an `Unless` condition matches, and run one or more actions. Use rules to route email, retain a compliance copy, isolate suspicious email, invoke an application, or change an email before delivery.
@@ -15 +15 @@ Rules tell your ingress endpoint how to handle incoming email by executing the a
-You build the rule's conditions by selecting an email property and a conditional operator for a value you enter that must be matched by the message before the rule will execute its actions—you define the actions to be taken as well as their order of execution.
+## How rule sets process email
@@ -17 +17 @@ You build the rule's conditions by selecting an email property and a conditional
-For greater granularity, your rules can also contain exceptions that are defined similar to conditions, but here, you're defining a condition that the message must _not_ match. Conditions and exceptions operate independently—you could build a rule with just exceptions if you wanted, as well as intermix conditions and exceptions.
+The following diagram shows how a rule evaluates conditions and `Unless` conditions, runs ordered actions, and continues to the next rule.
@@ -19 +19 @@ For greater granularity, your rules can also contain exceptions that are defined
-Due to the fine granularity of how rules can be defined within a rule set, the following list is provided to help illustrate the relationship of rule set components:
+![Accepted email enters a rule set. Rule 1 checks all its conditions and then its Unless conditions. If all conditions match and no Unless condition matches, the rule adds an X-Route header and relays the selected recipients. A condition that does not match or an Unless condition that matches skips the actions for those recipients. Processing then continues with Rule 2, named Invoices.](/images/ses/latest/dg/images/rule-set-processing.png)
@@ -21 +21 @@ Due to the fine granularity of how rules can be defined within a rule set, the f
-  * Rule sets contain:
+Rules run in the order that you configure. Each rule uses the following flow:
@@ -23 +23 @@ Due to the fine granularity of how rules can be defined within a rule set, the f
-    * Rules – You can define the order in which the rules are executed within the rule set.
+  1. The rule starts with the email's current recipients.
@@ -25 +25 @@ Due to the fine granularity of how rules can be defined within a rule set, the f
-**Rules contain:**
+  2. Each condition narrows the selected recipients. A recipient remains selected only if all conditions match.
@@ -27 +27 @@ Due to the fine granularity of how rules can be defined within a rule set, the f
-      * Conditions – The rule applies if the message matches the evaluation of the condition(s); and if the rule has exceptions, see below.
+  3. Each `Unless` condition checks the selected recipients. If any `Unless` condition matches a recipient, the actions do not run for that recipient.
@@ -29 +29 @@ Due to the fine granularity of how rules can be defined within a rule set, the f
-      * Exceptions – The rule applies if the message does not match the evaluation of the exception(s); and if the rule has conditions, see above.
+  4. The actions run in configured order for the recipients that remain selected. The next rule then evaluates the current recipient list.
@@ -31 +30,0 @@ Due to the fine granularity of how rules can be defined within a rule set, the f
-      * Actions – Actions are triggered when the rule applies—all of the conditions match and none of the exceptions.
@@ -33 +31,0 @@ Due to the fine granularity of how rules can be defined within a rule set, the f
-You can define the order in which the actions are executed within the rule.
@@ -35,0 +34 @@ You can define the order in which the actions are executed within the rule.
+## Example: Route email by recipient
@@ -36,0 +36 @@ You can define the order in which the actions are executed within the rule.
+This example shows how conditions select recipients and an `Unless` condition removes a recipient from that selection.
@@ -38 +38 @@ You can define the order in which the actions are executed within the rule.
-Because each rule can have multiple conditions, exceptions, and actions, and the fact that you can define the order of how rules and actions are executed, this enables you to build a very customized and automated email handling solution tailored to your specific business requirements.
+  * **Email recipients** – `[email protected]` and `[email protected]`.
@@ -40 +40 @@ Because each rule can have multiple conditions, exceptions, and actions, and the
-A rule set is an independent resource that can be used by more than one ingress endpoint, but rules belong exclusively to the rule set in which they were created. Thus, you must first create a rule set, or edit an existing one, before you can create rules to act upon the email coming into your ingress endpoint.
+  * **Conditions** – Recipient `ENDS_WITH` `@example.com`.
@@ -42 +42 @@ A rule set is an independent resource that can be used by more than one ingress
-The procedure in the next section will walk you through creating rule sets and their rules in the SES console.
+  * **Unless conditions** – Recipient `EQUALS` `[email protected]`.
@@ -44 +44 @@ The procedure in the next section will walk you through creating rule sets and t
-## Creating rule sets and rules in the SES console
+  * **Actions**
@@ -46 +46 @@ The procedure in the next section will walk you through creating rule sets and t
-The following procedure shows you how to use the **Rule sets** page in the SES console to create rule sets and their rules, and manage the ones you've already created.
+    1. Add the header `X-Route: orders`.
@@ -48 +48 @@ The following procedure shows you how to use the **Rule sets** page in the SES c
-###### To create an manage rule sets and rules using the console
+    2. Relay the email.
@@ -50 +50 @@ The following procedure shows you how to use the **Rule sets** page in the SES c
-  1. Sign in to the AWS Management Console and open the Amazon SES console at [https://console.aws.amazon.com/ses/](https://console.aws.amazon.com/ses/).
+  * **Result** – The actions apply to `[email protected]`. The `Unless` condition prevents them from applying to `[email protected]`.
@@ -52 +51,0 @@ The following procedure shows you how to use the **Rule sets** page in the SES c
-  2. In the left navigation panel, choose **Rule sets** under **Mail Manager**.
@@ -54 +52,0 @@ The following procedure shows you how to use the **Rule sets** page in the SES c
-  3. On the **Rule sets** page, choose **Create rule set** and enter a unique name for your rule set.
@@ -56 +53,0 @@ The following procedure shows you how to use the **Rule sets** page in the SES c
-  4. On the rule set's overview page, select **Edit** , and then select **Create new rule** on the edit page.
@@ -58 +55 @@ The following procedure shows you how to use the **Rule sets** page in the SES c
-  5. In the **Rule details** sidebar, enter a unique name for your rule.
+Conditions select the recipients for a rule. `Unless` conditions remove recipients from that selection. The actions run only for the recipients that remain.
@@ -60 +57 @@ The following procedure shows you how to use the **Rule sets** page in the SES c
-  6. Select **Add new condition** to create a condition that the message must match; or check the **EXCEPT in the case of:** box followed by **Add new exception** to create a condition that the message must _not_ match.
+## Choose a rule-set pattern
@@ -62 +59 @@ The following procedure shows you how to use the **Rule sets** page in the SES c
-  7. Build the condition or exception by selecting an email property and a conditional operator for the value you enter. Select **Add new condition** or **Add new exception** if you want to add more conditions or exceptions to this rule. _To learn more about a condition property and its operators and valid values, see theRule conditions reference._
+The following table maps common email-processing goals to rule-set patterns.
@@ -64,52 +61 @@ The following procedure shows you how to use the **Rule sets** page in the SES c
-     * If you're subscribed to an [Email Add On](./eb-addons.html), you'll be able to select it here as an email property.
-
-  8. Select **Add new action** to define the action to be taken when the rule's conditions are matched and/or exceptions are not matched. To add more actions to be taken, select **Add new action**. _When you create two or more actions, up/down arrows are displayed so that you can set the order of execution._
-
-Note
-
-To execute any of these Rule actions, you'll need to have their respective permission policy enabled for your account; otherwise, the rule action will fail. 
-
-  9. Apply the permission policy for any of these actions directly from the **Rule details** panel after selecting the action:
-
-    1. Choose **Create new role** in the **IAM role** field and enter a name followed by **Create role**. (The IAM trust policy for this role will automatically be generated in the background.)
-
-    2. Because the IAM trust policy was automatically generated, you'll only need to add the action's permission policy to the role—select**View role** under the **IAM role** field to open the IAM console.
-
-    3. Under the **Permissions** tab, choose **Add permissions** and select **Create inline policy**.
-
-    4. On the **Specify permissions** page, select **JSON** in the **Policy editor**.
-
-    5. Copy and paste the respective policy from [Permission policies for Mail Manager](./eb-policies.html) into the **Policy editor** and replace the data in red text with your own. (Be sure to delete any example code in the editor.)
-
-    6. Choose **Next**.
-
-    7. Review and create your permission policy for the IAM role by choosing **Create policy**.
-
-    8. Select your browser's tab where you have the SES Mail Manager **Edit rule set** page open and continue with the remaining steps for creating rules.
-
-  10. When you're done creating the conditions, exceptions, and actions for the rule, you save it to its rule set by choosing **Save rule set** located in the **Edit rule set** panel on the left.
-
-  11. If you want add more rules to the rule set, repeat steps 4 - 9 above.
-
-     * When you create two or more rules, up/down arrows are displayed in the rule set's **Reorder** column so that you can set the order of execution.
-
-  12. You can view and manage the rule sets you've already created from the **Rule sets** page. If there's a rule set you want to remove, select it's radio button followed by **Delete**.
-
-  13. To edit a rule set, select its name to open its overview page, from here, select **Edit** where you can reorder the execution of its rules, add more rules by choosing **Create new rule** , or delete a rule by selecting it's radio button followed by **Delete**.
-
-  14. To edit a rule, select its radio button. In any of the containers on the **Rule details** sidebar, you can edit any of the conditions or exceptions and change or reorder any of the actions. You can also remove conditions, exceptions, and actions, as well as add new ones.
-
-  15. When you're done with all your edits, save your changes by selecting **Save rule set** located in the **Edit rule set** panel on the left.
-
-
-
-
-## Reference for rule conditions and actions
-
-###### 
-
-Rule conditions
-
-The following reference table lists all the rule properties that are available to build a rule condition (or exception) and are categorized by their expression type. Rule properties that share the same expression type also share the same operators and values. Selecting a property's expression type will take you to its reference page in the _SES Mail Manager API Reference_ that lists all the available operators and valid values for that property.
-
-Rule conditions: Properties, operators, and values Property | Expression type  
+Goal | Rule-set pattern  
@@ -117,17 +63,6 @@ Rule conditions: Properties, operators, and values Property | Expression type
-From address To address CC address Mail from Recipient address Subject Helo MIME header Client certificate attribute _(mTLS ingress endpoints only)_
-
-  * Serial number
-  * Common name
-  * Country
-  * Locality
-  * Organization
-  * Organizational unit
-  * State
-  * Subject alternative name
-
-Vade Advanced Email Security [(if subscribed)](./eb-addons.html)
-
-  * Category
-  * Verdict
-
-Trend Micro Virus Scanning [(if subscribed)](./eb-addons.html)
+Keep a compliance copy and deliver email | [Archive and deliver email](./eb-rules-examples.html#eb-rules-examples-archive-deliver) – Archive, then relay or send.  
+Isolate suspicious email | [Isolate suspicious email](./eb-rules-examples.html#eb-rules-examples-isolate-suspicious) – Match a security result, write to Amazon S3, then drop.  
+Process application email | [Process email with Lambda](./eb-rules-examples.html#eb-rules-examples-lambda) – Match a recipient or subject, then invoke a Lambda function.  
+Route departments separately | [Route email by department](./eb-rules-examples.html#eb-rules-examples-department-routing) – Match a department recipient, then relay.  
+Mark email for downstream processing | [Add routing information](./eb-rules-examples.html#eb-rules-examples-add-header) – Add a header before delivery.  
+Change a destination during migration | [Replace recipients during migration](./eb-rules-examples.html#eb-rules-examples-replace-recipient) – Replace the recipient before later actions.  
@@ -135 +70 @@ Trend Micro Virus Scanning [(if subscribed)](./eb-addons.html)
-  * Category
+###### Related resource
@@ -137,5 +72 @@ Trend Micro Virus Scanning [(if subscribed)](./eb-addons.html)
-|  [_Valid operators and values for string expressions_](https://docs.aws.amazon.com/sesmailmanager/latest/APIReference/API_RuleStringExpression.html)  
-IP range |  [_Valid operators and values for IP expressions_](https://docs.aws.amazon.com/sesmailmanager/latest/APIReference/API_RuleIpExpression.html)  
-Message max size |  [_Valid operators and values for number expressions_](https://docs.aws.amazon.com/sesmailmanager/latest/APIReference/API_RuleNumberExpression.html)  
-DKIM SPF |  [_Valid operators and values for verdict expressions_](https://docs.aws.amazon.com/sesmailmanager/latest/APIReference/API_RuleVerdictExpression.html)  
-TLS TLS wrapped Read receipt Vade Advanced Email Security [(if subscribed)](./eb-addons.html)
+For an end-to-end routing and archiving walkthrough, see [AWS Messaging Blog: Mail Manager – Amazon SES introduces new email routing and archiving features](https://aws.amazon.com/blogs/messaging-and-targeting/mail-manager-amazon-ses-introduces-new-email-routing-and-archiving-features/).
@@ -143,5 +74 @@ TLS TLS wrapped Read receipt Vade Advanced Email Security [(if subscribed)](./eb
-  * Is passed
-
-Trend Micro Virus Scanning [(if subscribed)](./eb-addons.html)
-
-  * Is passed
+## Reference for rule conditions and actions
@@ -149,2 +76 @@ Trend Micro Virus Scanning [(if subscribed)](./eb-addons.html)
-|  [_Valid operators and values for boolean expressions_](https://docs.aws.amazon.com/sesmailmanager/latest/APIReference/API_RuleBooleanExpression.html)  
-DMARC policy |  [_Valid operators and values for DMARC expressions_](https://docs.aws.amazon.com/sesmailmanager/latest/APIReference/API_RuleDmarcExpression.html)  
+  * For information about selecting email and recipients with `Conditions` and `Unless` conditions, see [Rule conditions](./eb-rules-conditions.html).
@@ -152 +78 @@ DMARC policy |  [_Valid operators and values for DMARC expressions_](https://doc
-Recipient address matching and subaddressing
+  * For information about action order, configuration, permissions, and failure behavior, see [Rule actions](./eb-rules-actions.html).
@@ -154 +79,0 @@ Recipient address matching and subaddressing
-The _Recipient address_ property uses the full SMTP envelope recipient address exactly as received, including any subaddress extension (also known as "plus addressing"). For example, if a message is sent to `[email protected]`, the recipient address evaluated in the rule condition is `[email protected]`, not `[email protected]`.
@@ -156 +80,0 @@ The _Recipient address_ property uses the full SMTP envelope recipient address e
-This means that an `EQUALS` or `CONTAINS` rule targeting `[email protected]` will not match `[email protected]`. If you need to match all subaddressed variants of an address, consider using an address list with wildcard entries (e.g., `user*@example.com`). Alternatively, `ENDS_WITH` with the domain (e.g., `@example.com`) can be used for broader domain-level matching.
@@ -158 +81,0 @@ This means that an `EQUALS` or `CONTAINS` rule targeting `[email protected]` will
-How To address and CC address differ from Recipient address
@@ -160 +83 @@ How To address and CC address differ from Recipient address
-The _Recipient address_ property is evaluated separately for each envelope recipient of the email. The _To address_ and _CC address_ properties are read from the message's `To` and `CC` headers, which are the same for every recipient, so these conditions give the same result for every recipient.
+## Topics in this section:
@@ -162 +85 @@ The _Recipient address_ property is evaluated separately for each envelope recip
-When the header contains more than one address, the condition matches if any of the addresses matches. For the negative operators, `NOT_EQUALS` and `IS_FALSE`, the condition matches only if none of the addresses match.
+  * [Create and manage rule sets](./eb-rules-setup.html)
@@ -164 +87 @@ When the header contains more than one address, the condition matches if any of
-For example, a rule that drops email when the _To address_ is not in an address list drops no recipients if at least one address in the `To` header is in the list. To act on individual recipients, such as dropping only the recipients that aren't in an address list, use _Recipient address_.
+  * [Rule conditions](./eb-rules-conditions.html)
@@ -166 +89 @@ For example, a rule that drops email when the _To address_ is not in an address
-######