How to block outgoing emails with attachments larger than 25 MB

Problem

How can you block users from sending emails with attachments larger than 25 MB to avoid exceeding Gmail limits?

Environment

  • Admin console
  • Settings for Gmail

Solution

You can accomplish this behavior on your domain by setting up a compliance rule. Follow the instructions below for set up:

  1. Log in to your Admin console.
  2. On the main menu select Apps > Google Workspace > Gmail > Compliance.
  3. Scroll down to Content compliance.
  4. Click Configure or Add a new rule.
  5. Name your Attachment compliance rule.
    • Email messages to affect: Outbound, Internal sending.
    • Add expressions that describe the content you want to search for in each message.
    • If any of the following match the message:
      1. Expressions > Add.
      2. On the first drop down menu select Message Size.
      3. On the message site amount type: 25.
      4. Click Save.
    • If the above expressions match, do the following:
      1. Select Reject message.
      2. Type the rejection message.
  6. Click Save.