You can set up email routing and delivery options for your organization in the Google Admin console. These options include rejecting, quarantining, or delivering email with modifications. For example, you can route mail to Gmail and an external server or set policies that vary by organizational unit.
Understand how settings apply
Unless you change the options, the rules apply to all users in an organizational unit. You can disable in a child organization any rules they inherit from a parent organization. You can also add multiple rules to each organization.
When you set up multiple rules, what happens to a message depends on the conditions you set and which rule has precedence. For details, read How multiple settings affect message behavior.
Before you begin
If you want to send messages to different mail servers:
- Create a list of mail hosts, also called routes.
- Add the routes in the Google Admin console. For details, see Add mail routes for advanced Gmail delivery.
From the Admin console Home page, go to AppsGoogle WorkspaceGmailAdvanced settings.
Tip: To see Advanced settings, scroll to the bottom of the Gmail page.
In the Routing section, point to Routing and choose an option:
To set up a new setting, click Configure.
If the setting is already configured, click Edit or Add another.
- Enter a unique name for the setting.
Go to the next step to configure the setting.
- Check the boxes next to the messages you want the policy to apply to:
- Inbound—Incoming messages
- Outbound—Outgoing messages
- Internal-sending—Internal message with one of the domains or subdomains from your organization listed in the To field
- Internal-receiving—Internal message with one of the domains or subdomains from your organization listed in the From field
Note: For split delivery, dual delivery, catch-all addresses, or to route messages to additional recipients, select Inbound, Internal-receiving, or both.
- Go to the next step to continue.
How SPF or DKIM authentication affects routing
- Routing rules also apply to messages originating outside of Gmail that one of your domains authenticates through Sender Policy Framework (SPF) or DomainKeys Identified Mail (DKIM).
- If you send a message from your domain and the SPF or DKIM authentication check fails, Gmail won’t recognize the sender. It treats the message as external, even if you have other rules in place.
You can choose to affect only specific envelope senders and recipients. You can specify a single recipient, a number of users using a regular expression, or email groups.
To set up an envelope filter:
- Check one or both of these options:
- Only affect specific envelope senders
- Only affect specific envelope recipients
- From the list, choose an option:
- Single email address—Enter the complete email address for a user.
- Pattern match—Enter a regular expression to specify a set of senders or recipients in your domain. For example:
For details, go to Guidelines for using regular expressions.
- Group membership—Select one or more groups in the list. For envelope senders, this option only applies to sent mail. For envelope recipients, it only applies to received mail. If you haven't, first create the group.
Note: This option affects both direct and indirect group members. For example, if Group B is a member of Group A, users in Group B are indirect members of Group A.
- Continue to the next step.
Rejects the message before reaching the recipient. You can enter a message to notify the sender about why the message was rejected. For matching messages, no other routing or compliance rules are applied.
Note: Gmail automatically adds an SMTP rejection code, such as 550 5.7.1. This is a requirement of the SMTP standard and can't be deleted.
Sends the message to an admin quarantine where you can review the message before you send or reject it. This option is only available for the Users account type. For details, see Account types to affect.
To notify your users when their sent messages are quarantined, check the Notify sender when mail is quarantined (onward delivery only) box.
You can modify a message in the following ways:
|Add X-Gm-Original-To header||
Add a header tag if the recipient is changed. When you do, the downstream server will know the original envelope recipient. An example of the header tag format is X-Gm-Original-To: firstname.lastname@example.org.
|Add X-Gm-Spam and X-GM-Phishy headers||
Add headers to indicate the spam and phishing status of the message. For example, an administrator at a downstream server can use this information to set up rules that handle spam and phishing differently from clean mail. For details, see Add spam headers setting to all default routing rules.
|Add custom headers||You can add custom headers to messages that are affected by this setting. For example, you can add a header that matches the description that you entered for the setting. This can help you analyze why a message was routed in a certain way or why a rule was triggered.|
|Prepend custom subject||You can enter a string to add to the beginning of the subject of applicable messages. For example, you could enter Confidential in this field for sensitive emails. If a message triggers the rule and its subject is Monthly report, recipients will see the following subject: [Confidential] Monthly report.|
|Change route and Also reroute spam||
|Change envelope recipient||
The message bypasses the original recipient’s mailbox and goes to the new recipient.
You can change the envelope recipient in one of the following ways:
An MX lookup on the new recipient's domain determines the destination server. Or, if you’re using the Change route control, the specified route determines the destination server.
If you'd rather Bcc an additional recipient, use the Add more recipients option, described below.
|Bypass spam filter for this message||
Deliver incoming messages to recipients even if the spam filter identifies them as spam. This option applies to only incoming messages only. You can’t bypass spam filters for outgoing messages.
Note: This option is not available for the Groups account type. For details, see Account types to affect.
|Remove attachments from message||You can remove any attachments from messages. You can also append text to notify recipients that attachments were removed.|
|Add more recipients||
When you add recipients, consider that:
|Encryption (onward delivery only)||
By default, Gmail tries to deliver messages using Transport Layer Security (TLS). If secure transport isn’t available, the message is delivered over a nonsecure connection.
To require all messages meeting the conditions in the setting to be transmitted through a secure connection, check the Require secure transport (TLS) box. If TLS isn't available on the sending or receiving side, the message won't be sent.
If you have an Enterprise or Enterprise for Education account, you can also bounce messages or require that messages can only be sent if they are S/MIME encrypted. For details, go to Enhance message security with hosted S/MIME.
For an overview on routing settings and the types of delivery, such as dual and split delivery, see Email routing and delivery.
To set up dual delivery, split delivery, a catch-all address, or to route messages to additional recipients:
- Under For the above types of messages, do the following, click the Down arrow and then select Modify message.
- Choose an action and follow the steps to set it up:
Action Setup steps Split delivery
- Select Change route.
- From the list, select the external server.
- Scroll down and click Save.
- Under Also deliver to, select Add more recipients and click Add.
- Under Recipients, click the Down arrow Advanced.
- Select Change route and from the list, select the secondary mail route.
- Scroll down and click Save.
- Enter a description (for example, “Catch-all”)
- Click Messages to affect
- Check Inbound
- Check Internal-receiving
- Scroll to Envelope recipient, and select Change envelope recipient.
- Select Replace recipient and type catch-all address.
- Click Show options.
- Under Account types to affect
- Check Unrecognized / Catch-all
- Uncheck Users
- Uncheck Groups
- Click Add setting.
Route messages to additional recipients
- Under Also deliver to, check the Add more recipients box.
- Click Add.
- Under Recipients, make sure that Basic is selected in the list.
- Enter the recipient’s email address and click Save.
- Click Add Setting or Save.
- Choose an option:
- To set up additional parameters that limit the application of the setting, go to step 5.
- To save the setting, go to step 6.
To set up additional options for a routing policy, such as creating address lists or choosing the account types it will affect, at the bottom, click Show options.
You can specify address lists as a criteria for whether to bypass or apply a routing policy. These lists can contain email addresses, domains, or both.
To create an address list:
- Under Address lists, check the Use address lists to bypass or control application of this setting box.
- From the list, choose how to apply the address list:
- Apply address lists to correspondents—Considers the From field for received mail and the recipients for sent mail. For senders, the authentication requirement is also checked.
- Apply address lists to recipients—Checks if the recipients are present in the address list.
- Choose an option:
- Bypass this setting for specific addresses / domains—Skips the setting if the address list matches, regardless of any other criteria in the setting.
- Only apply this setting for specific addresses / domains—The address list match becomes a condition for whether the setting is applied. If there are other criteria in the setting, such as match expressions, account types, or envelope filters, they must also match for the setting to be applied.
- Click Use existing or create a new one.
- Select the name of an existing list or enter a name for a new list and click Create.
- Point to the list name and click Edit.
- To add addresses and domains to the list, click Add .
- Enter a full email address or a domain name. To add multiple addresses, place a comma between each one or enter a space-delimited list.
- (Optional) To bypass the setting for approved senders that don't have authentication, uncheck the Require sender authentication box.
Note: Use this option with caution as it might lead to spoofing. Learn more about sender authentication.
- Click Save.
- (Optional) To include additional email addresses or domains in the list, repeat steps 5–8.
- Proceed to Account types to affect.
Depending on the message action you chose and the type of organizational unit you’re configuring, some account types might not be available.
Select one or more account types that the setting applies to:
- Users (default)—The setting applies to provisioned users. For sending and outbound mail, the setting is triggered when your users send email. For receiving and inbound mail, the setting is triggered when your users receive email.
- Groups—The setting applies to groups set up in your organization. For sending and outbound mail, the setting is triggered when your groups forward email or summaries to members. For receiving and inbound mail, the setting is triggered when your groups receive email.
- Unrecognized/Catch-all—The setting is triggered when your organization receives email that doesn’t match one of your provisioned users. This selection only applies to received and inbound email.
Note: The Groups and Unrecognized/Catch-all account types don’t apply to these controls:
- Add X-Gm-Spam and X-Gm-Phishy headers
- Bypass spam filter for this message
- Also reroute spam
When you're finished, go to Add and save the setting.
- Click Add setting or Save.
New settings appear on the Gmail Advanced settings page.
- At the bottom, click Save.
Send messages with S/MIME encryption
Depending on your edition, you can improve message security with S/MIME. For example, set up a rule that requires S/MIME encryption for outgoing messages. Set this rule up with the Encryption option, described in step 4 above.
For details, see Enhance message security with hosted S/MIME.
Google, Google Workspace, and related marks and logos are trademarks of Google LLC. All other company and product names are trademarks of the companies with which they are associated.