Objectionable content setting

The Objectionable content setting enables you to specify what action to perform for messages based on word lists that you create. With Objectionable content policies, you choose whether messages containing certain words (such as obscenities) are rejected or delivered with modifications; for example, to notify others when the content of a message matches the rules that you set.

You can also configure this setting to reject outbound emails that may contain sensitive company information; for example, by setting up an outbound filter for the word confidential.

Similar to other email security settings, the Objectionable content setting applies to all users in an organizational unit. Users within child organizations inherit the settings you create for the parent organization. You also have the option to add multiple Objectionable content settings to each organizational unit.

Changes to the Objectionable content setting may require up to one hour to take effect. You can track prior changes with the Admin console audit log.


  • Most advanced Gmail settings (for example, Content compliance, Objectionable content, and Attachment compliance), do not apply to mailing lists, only to users. The Default routing setting can be applied to mailing lists, however.
  • The Objectionable content setting supports the scanning of text attachments and common attachment types, such as .doc, .xls and .pdf.
  • The Objectionable content filtering does not currently support localized text with non-ASCII characters.

To configure Objectionable content settings for your domain or organizational unit:

  1. Sign in to the Google Admin console
  2.  From the dashboard, go to Apps > Google Apps > Gmail > Advanced settings
  3. In the Organizations section, highlight your domain or the organizational unit for which you want to configure settings (see Configure advanced settings for Gmail for more details).
  4. Scroll down to the Objectionable content section:
    • If the setting's status is Not configured yet, click Configure (the "Add setting" dialog box displays).
    • If the setting's status is Locally applied, click Edit to edit an existing setting (the "Edit setting" dialog box displays), or click Add another to add a new setting (the "Add setting" dialog box displays).
    • If the setting’s status is Inherited, click View to view the inherited setting, or click Add another to add a new setting (the "Add setting" dialog box displays).
  5. When you're finished making changes, click Add Setting or Save to close the dialog box.
    Note: Any settings you add will be highlighted on the "Email settings" page.
  6. Click Save changes at the bottom of the "Email settings" page.

In the "Objectionable content" window, click Add a description to enter a unique name for this setting. See the sections below for additional instructions and guidelines.

Email messages to affect
This option allows you to set the policy for inbound, outbound, or intradomain mail (sending or receiving within the set of domains associated with your organization). By default, each of the following boxes is checked. However, for example, to limit the Objectionable content policy to outbound mail, you can clear all check boxes, except Outbound. This configuration would enable users to receive emails that contain profanity (for example, from unhappy customers), while users could also forward those same messages internally. Meanwhile, selecting Outbound prevents your users from sending the same profanity to outbound recipients (to help ensure the replies are respectful).
  • Inbound— Messages received by your users from senders outside the set of domains associated with your company or organization
  • Outbound—Messages sent by your users to recipients outside the set of domains associated with your company or organization
  • Internal - sending—Messages sent by your users to recipients within the set of domains associated with your company or organization
  • Internal - receiving—Messages received by your users from senders within the set of domains associated with your company or organization
Add words you want to search for in each message
Use the Custom objectionable words list to create your own list of objectionable words.

To create a list of Custom objectionable words:

  1. Click Edit > Add.
  2. In the Enter words field, type a list of words (separated by spaces or commas).
  3. Click Save.
Note: Consider the following when you create a custom word list:
  • Capitalization is ignored. For example, "BAD" will match "bad", Bad", and "BAD"
  • Only complete words will be matched. For example, if you add "bad" to the custom word list, "badminton" will not be matched.
  • Word search is performed on subject, body, and text attachments.
If the message contains the above words, do the following

This section enables you to specify what action to perform on a message when the conditions are met for an Objectionable content setting. You have three options in the drop-down list:Modify message, Reject message, or Quarantine message.

Modify message
This option enables you to modify messages by adding headers, changing the route, changing the envelope recipient, adding more recipients (additional, or secondary routes), and removing attachments.

Objectionable content routing enables you to implement special handling for certain types of email; for example, to route messages with specific content to your human resources department. Do this by defining a new primary route, or by creating additional routes that match specific text strings or patterns.

Note: We recommend that you use routing settings for the specific use cases they're intended to support. For example, you can set up the same routing options by using an Objectionable content setting or a Receiving routing setting; but, use an Objectionable content or Content compliance setting for content-related use cases, and use a Receiving routing setting for general routing-related use cases, such as dual delivery.

For more details and step-by-step instructions about mail routing, including use cases and examples, see Manage mail routing and delivery: Guidelines and best practices.

See the following descriptions for more details about routing controls:

Add X-Gm-Original-To header

By checking this box, a header tag is added in case the recipient is changed so that the downstream server can know the original envelope recipient; for example, X-Gm-Original-To: jjsmith@solarmora.com.

Adding the X-Gm-Original-To header is useful if you're rerouting a copy of the message to another recipient. In this case, you're changing the recipient address, but the new recipient wants to know the address of the original envelope recipient, and can see the original envelope recipient by checking the X-Gm-Original-To header in the message.

Add X-Gm-Spam header and X-Gm-Phishy header

Messages that are routed through Gmail are automatically filtered for spam and phishing. Selecting the Add X-Gm-Spam header and X-Gm-Phishy header option adds the following headers to indicate the spam and phishing status of the message:

For spam

0 indicates that a message is not spam: X-Gm-Spam: 0

1 indicates that a message is spam: X-Gm-Spam: 1

For phishing

0 indicates that a message is not phishing: X-Gm-Phishy: 0

1 indicates that a message is phishing: X-Gm-Phishy: 1

Note:  Any message marked as phishy is automatically marked as spam.

Choosing the Add X-Gm-Spam header and X-Gm-Phishy header option enables an administrator at a downstream server to set up rules that handle spam and phishing differently from clean mail.

Add custom headers

You can add one or more custom headers to messages that are affected by a Receiving routing setting, Sending routing setting, or other setting. For example, you can add a header that matches the description that you entered for the setting, which can be helpful for analyzing why a message was routed in a certain way, or why a filter was triggered.

Prepend custom subject

You can enter a string to prepend to the subject of messages. For example, if you enter Confidential, message recipients might see the following subject: [Confidential] Monthly report.

Change route and Reroute spam

Change route
The Change route option enables you to change the destination of the message. By default, the Gmail mail server is the primary delivery location. However, you can change the delivery location; for example, by routing mail to an on-premise mail server such as Microsoft Exchange.

Before you can change the delivery location, you must first add mail routes with the Hosts tab. The routes that you add on the Hosts tab are then visible in the route drop-down list.

Reroute spam
The Reroute spam option is visible when you check the Change route box. Reroute spam enables you to route all mail that matches the criteria of the setting, including mail that has been marked as spam. If you check the Change route box but do not check the Reroute spam box, then normal mail is rerouted but spam mail is not rerouted (spam messages are stored in the Google Apps platform for 30 days).


  • Whether you check the Reroute spam box or not, blatant spam is not rerouted since it’s dropped instantly at delivery time.
  • If mail is classified as spam but one of the Google Apps email settings overrides that (for example, due to a sender whitelist), then the mail is not considered to be spam for this purpose and will be rerouted as normal mail.
Change envelope recipient

To change the envelope recipient, click the option next to the Replace recipient field, and enter the user's email address; for example, jjsmith@solarmora.com.

Changing the envelope recipient for a message on the primary delivery is equivalent to forwarding a message to a different recipient. You can also change the envelope recipient on the additional (secondary) delivery, which is equivalent to a "bcc".

Bypass spam filter for this message

Select this option to deliver incoming messages to recipients even if the spam filter identifies these messages as spam.

Note: Even if you select this option, in some cases, "super spammy" messages can still be marked as spam and delivered to the recipients' Spam folder. Also, this option applies to incoming messages only—you can’t bypass spam filters for outgoing mail.
Remove attachments from message

Select this option to remove any attachments from messages. Optionally, you can append text to notify recipients that attachments were removed.

Add more recipients
  1. Check the Add more recipients box to set up additional (or secondary) deliveries for dual delivery or multiple delivery.
  2. Select Basic from the drop-down list to add individual email addresses, and then click Save. Click Add to add multiple recipient addresses.
  3. Select Advanced from the drop-down list to choose advanced options for your secondary delivery. Similar to the settings that you modified for the primary delivery, you can change the envelope recipient, add headers, prepend a custom subject, and remove attachments for the secondary deliveries.

Note: Any settings that you configure for the primary delivery also affect the secondary deliveries. For example, if you change the envelope recipient, prepend a custom subject, and add custom headers to the primary delivery, the same configuration is applied to the secondary deliveries.

Require secure transport for onward delivery

Check this box to include secure delivery as part of content compliance for outbound messages.

Reject message
This option rejects the message before it reaches the intended recipient. The default rejection message is: "Sorry, a policy is in place that prevents your message from being sent. Please contact your administrator." You can also enter customized text for the rejection notice.

Quarantine message

This option sends the message to an admin quarantine, where you can review the message before deciding whether to send it to its intended recipient or reject it.

For more details and step-by-step instructions about mail routing, including use cases and examples, see Manage mail routing and delivery: Guidelines and best practices.

Note: When you're finished, click Add Setting > Save changes at the bottom of the "Email settings" page to confirm your changes.
Was this article helpful?