Create a compliance rule to block incoming messages

Problem

As a super admin, how can you block emails from certain IP addresses using Content compliance rules?

Solution

  1. From the Admin console, go to Apps > Google Workspace > Gmail > Compliance.
  2. Scroll to the Content compliance setting in the Compliance section, hover over the setting, and click Configure. If the setting is already configured, hover over the setting and click Edit or Add another.
  3. For each new setting, enter a unique description.
  4. The Add setting dialog box appears. Enter a name, select the message type to match, and define what action to take based on the message. 
  5. In the Add setting dialog box:
    • Enter a name for the rule.
    • In the Email messages to affect, check the Inbound box.   
    • From Add expressions, choose If any of the following match the message. 
    • In Expressions, click Add, and then select Metadata match.
    •  From the Attribute drop-down, choose Gmail confidential mode, and for Match type, choose Message is in Gmail Confidential mode.
    • Click Save.
  6. In the next section, which identifies what to do if the expressions match, choose Reject message.
  7. (Optional) If desired, enter a customized rejection notice, which is directed back to the sender.  
  8. Click Add setting.     

Full list of steps is found in this Help Center article, https://support.google.com/a/answer/1346934?h

Cause

Users may be getting spam emails that are not detected by spam filters, as senders may have managed to use content that is considered as spam mail.