Send feedback
How to block outgoing emails with attachments larger than 25 MB
Stay organized with collections
Save and categorize content based on your preferences.
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:
Log in to your Admin console . On the main menu select Apps > Google Workspace > Gmail > Compliance . Scroll down to Content compliance . Click Configure or Add a new rule . 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:
Expressions > Add .On the first drop down menu select Message Size . On the message site amount type: 25 . Click Save.
If the above expressions match , do the following:
Select Reject message . Type the rejection message.
Click Save .
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2023-10-02 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-10-02 UTC."],[],[]]