Retain Gmail messages with Vault

Set retention rules in Vault to control how long Gmail messages are retained by your organization for data governance and eDiscovery.

Set custom retention rules to keep data that matches specific conditions for set time. Set a default retention rule when you need to keep all data for a service for all licensed accounts in your organization for a set time. Custom retention rules override default retention rules, even when the default retention rule has a longer retention period.

Before you set retention rules, we strongly recommend you read about how retention works.

WARNING: An improperly configured retention rule can allow Gmail to immediately and irreversibly purge messages. Use caution when you create or change retention rules. We recommend that you test new rules on a small set of accounts before you apply the rules to your entire organization.

Key Gmail retention behavior

  • When a message is included in a hold, Gmail can’t purge the message even after all applicable retention periods end.
  • Custom Gmail retention rules always supersede the default Gmail retention rule.
  • When multiple custom retention rules apply to a message, Gmail keeps the message as required by the rule with the retention period that ends last.
  • Gmail's 30-day preservation policy can delay when messages are purged.

Important information about Gmail retention

Open all   |   Close all

When Gmail messages are purged

For Gmail to purge a message, the message must meet criteria for both Vault and Gmail:

  • It isn’t retained by any retention rules.
  • It isn’t on hold.
  • It has Gmail’s system-generated ^deleted label for at least 30 days.

Vault doesn’t allow Gmail to purge a message if the message is covered by a retention rule or hold. After all applicable retention periods and holds end, Gmail evaluates if the message can be purged based on how long the message has the ^deleted label.

When the ^deleted label is applied

Gmail applies the ^deleted label to messages that are eligible to be removed from Google systems. A message gets this label when any of the following actions occur:

  • Gmail users empty their Trash or select messages in Trash and click Delete forever.
  • Gmail automatically deletes a message that's been in Trash for 30 days.
  • The retention period ends on a message that doesn't already have the ^deleted label.
  • Gmail users discard draft messages.

The ^deleted label hides messages from Gmail users, and users can't recover these messages without help from a G Suite admin. However, you can still search and export messages with this label using Vault until those messages are purged.

Gmail's 30-day preservation policy

Gmail has a preservation policy that keeps messages for a minimum of 30 days after the ^deleted label is applied. This policy supersedes any Vault retention rules that expire during those 30 days.

To better understand how Gmail's 30-day preservation policy affects when messages are purged, review the message retention examples.
Gmail threads are treated differently from individual messages

For email threads:

  • If one message in a thread is retained by a retention rule or hold, the entire thread is retained.
  • Retention rules based on labels use the date of the most recently labeled message in a thread for retention purposes.

For example, if a retention rule keeps messages with the label project-A for 365 days and the first message in a thread has the label, then all messages in the thread are retained for 365 days from when the first message was sent. If a later message in the thread gets the label project-A, then all messages in the thread are now retained for 365 days from when that later message was sent. After the retention rule expires and Gmail purges the labeled messages, there can be a delay of up to 24 hours for any unlabeled messages to also be purged.

Retention of draft messages and templates

Draft messages that aren’t discarded are handled like other Gmail messages. When you create a custom retention rule, you can choose to exclude drafts, and the rule doesn't affect draft messages.

Note: Email templates are treated as draft messages. If a retention rule purges draft messages after a set time, templates are also purged.

Discarded draft messages (drafts that the user discarded without sending) aren’t subject to retention rules or holds. If a draft is discarded before it’s sent, Gmail applies the ^deleted label and the draft is purged 30 days later.

System-generated Gmail labels may affect retention coverage

Gmail uses system-generated labels to categorize messages and user-visible labels to let users sort messages in their inboxes. Gmail might apply the system-generated finance label to messages that come from a user's bank and the system-generated travel label to messages that include hotel reservations.

Users can create and apply user-visible labels. Sometimes, these labels can match system-generated labels. When the 2 types of labels match, Vault retention rules apply to the messages with the user-created label and not to messages with the identical system-generated label. If you create a retention rule based on a label, you might include or exclude more messages than you intend to cover.

Example

Your organization is required to retain all data related to corporate finance for 7 years and the following actions occur:

  • Employees are instructed to create a label, finance, and apply it to messages that include corporate financial information.
  • Employees have their corporate credit card statements emailed to their work accounts. They don’t apply the user-created finance label, but Gmail applies the system-generated finance label to these messages.

In this scenario, a retention rule that includes messages with label:finance retains only the user-labeled messages but not the messages with the system-generated label that have the employees' corporate credit card statements.

Common system-generated labels

  • personal
  • social
  • promotion
  • promos
  • updates
  • forums
  • travel
  • purchases
  • finance
  • all
  • buzz
  • chat
  • chats
  • done
  • draft
  • drafts
  • important
  • inbox
  • lowpriority
  • low_priority
  • mute
  • muted
  • pinned
  • read
  • reminder
  • reminders
  • scheduled
  • sent
  • snoozed
  • spam
  • phishing
  • star
  • starred
  • task
  • tasks
  • trash
  • trips
  • unimportant
  • unread
  • voicemail
  • saved 
Retention and Gmail confidential mode messages

Gmail confidential mode lets users restrict recipients' access to sensitive email content. This feature is available to G Suite organizations that enable the feature and personal Gmail accounts.

When a user sends a confidential message, Gmail replaces the message body and attachments with a link. Only the subject and link are sent using SMTP.

Confidential mode messages sent by users in your domain

If your organization enables Gmail confidential mode, Vault can hold, retain, search, and export all confidential mode messages sent by users in your organization.

Confidential messages sent after November 30, 2018 are visible to Vault in the mailboxes of all internal senders and recipients. Messages are always available to Vault, even when the sender sets an expiration date or revokes recipients' access to confidential mode messages.

Confidential mode messages received from outside your domain

Even if your organization doesn't enable Gmail confidential mode, your users might receive confidential mode messages from other G Suite customers and from personal Gmail accounts.

You can hold, retain, search, and export message headers and subjects of external confidential messages. However, you can't search or export message content or attachments from external confidential messages.

Note: G Suite admins can create a compliance rule that blocks incoming confidential mode messages from being delivered to your domain.

How to retain confidential mode messages

Confidential mode messages are subject to Gmail retention rules like any other type of message. To apply retention rules specifically to confidential mode messages, use the term label:confidentialmode.

Example Gmail retention rules and their effect

Example default rule: Retain all messages indefinitely

This default rule keeps all Gmail messages in the selected organizational unit indefinitely. Users can still delete messages, and messages are removed from their Trash after 30 days or when the user empties Trash. However, the messages remain searchable and exportable by Vault admins.

Rule configuration

  • Duration: Indefinite

Effect on sent and received messages

User action on a sent or received message When Gmail applies ^deleted label When Gmail purges the message

User does nothing with the message

Never Never

User moves the message to Trash and empties Trash 1 day after the message was sent

1 day after send Never

User moves the message to Trash 1 day after the message was sent (but doesn’t empty Trash)

31 days after send, when Gmail automatically removes the message from Trash Never

Effect on draft messages

User action on a draft message When Gmail applies ^deleted label When Gmail purges the message

User writes a draft message but doesn't send it

Never Never

User writes a draft message and discards it without sending it

When the user discards the draft 30 days after the user discards the draft (due to Gmail's 30-day preservation policy)
Example custom rule: Purge only deleted messages after 365 days
This rule allows Gmail to purge only messages for the selected organizational unit that are permanently deleted (removed from Trash) after 365 days.

Rule configuration

  • Duration: 365 days
  • Action after expiration: Select Expunge just the messages that users have already deleted

Effect on sent and received messages

User action on a sent or received message When Gmail applies ^deleted label When Gmail purges the message

User does nothing with the message

Never Never

User moves the message to Trash and empties Trash 1 day after the message was sent

1 day after send 365 days after send

User moves the message to Trash 1 day after the message was sent (but doesn’t empty Trash)

31 days after send, when Gmail automatically removes the message from Trash 365 days after send
User moves the message to Trash and empties Trash 360 days after the message was sent 360 days after send 390 days after send (30 days after Trash was emptied due to Gmail's 30-day preservation policy)
User moves the message to Trash 400 days after the message was sent (but doesn’t empty Trash) 430 days after send, when Gmail automatically removes the message from Trash 460 days after send (30 days after Gmail removed the message from Trash due to Gmail's 30-day preservation policy)

Effect on draft messages

User action on a draft message When Gmail applies ^deleted label When Gmail purges the message

User writes a draft message but doesn't send it

Never Never

User writes a draft message and discards it without sending it

When the user discards the draft 30 days after the user discards the draft (due to Gmail's 30-day preservation policy)
Example custom rule: Purge messages after 365 days

This rule allows Gmail to purge all messages for the selected organizational unit after 365 days, including drafts and messages that users haven’t deleted. 

Rule configuration

  • Duration: 365 days
  • Exclude drafts: unchecked
  • Action after expiration: Select Expunge all messages, which includes messages that are in users' inboxes and messages that have already been deleted

Effect on sent and received messages

User action on a sent or received message When Gmail applies ^deleted label When Gmail purges the message

User does nothing with the message

365 days after send, when retention period ends 395 days after send (30 days after the retention period ends due to Gmail's 30-day preservation policy)

User moves the message to Trash and empties Trash 1 day after the message was sent

1 day after send 365 days after send, when retention period expires
User moves the message to Trash and empties Trash 360 days after the message was sent 360 days after send, when the user empties Trash 390 days after send (30 days after Trash was emptied due to Gmail's 30-day preservation policy)
User moves the message to Trash 360 days after the message was sent (but doesn’t empty Trash) 365 days after send, when retention period ends 395 days after send (30 days after the retention period ends due to Gmail's 30-day preservation policy)

Effect on draft messages

User action on a draft message When Gmail applies ^deleted label When Gmail purges the message

User writes a draft message but doesn't send it

365 days after send, when retention period ends 395 days after send (30 days after the retention period ends due to Gmail's 30-day preservation policy)

User writes a draft message and discards it without sending it

When the user discards the draft 30 days after the user discards the draft (due to Gmail's 30-day preservation policy)

Create a custom retention rule for Gmail

Custom rules can be based on organizational units, date ranges, or search terms. Custom rules always override the default rule, and if multiple retention rules apply to a message or file, it is retained according to the rule with the longest retention period.

To create custom retention rules:

  1. Sign in to Vault.
  2. In the left navigation, click Retention.
  3. Click Create Rule.
  4. Choose where to apply the rule: Mail.
  5. Choose an organizational unit from the drop-down list.
  6. Choose what conditions must be met for messages to be covered by this rule:
    • Enter the sent date for messages subject to this rule. If you specify only a start date, the rule applies to all messages received after that date. If you specify only an end date, the rule applies to all messages received before that date.
    • Enter any terms that might appear in messages subject to this rule. You can also use search operators in this field.
      Note: Do not use wildcards (*) with retention rules.
    • To exclude drafts, check the Exclude drafts box.
  7. Choose how long to keep messages:
    • Choose indefinitely to permanently retain data that matches the parameters of this rule.
    • To discard messages after a set time, enter the number of days, from 1 to 36,500.
  8. If you set a duration, choose what to do with messages past the duration you selected:
    • Choose the first option to expunge only the messages that users have already deleted.
    • Choose the second option to expunge all messages. This includes messages that are in users’ inboxes. It also includes messages that have already been deleted.
  9. Click Preview to display a list of messages or files that will be covered by this retention rule. Examine the list to verify that you've set the rule correctly. Make sure it does not permanently delete data that users may need.
    Warning: Vault immediately begins the process of purging data that exceeds the retention coverage period as soon as you submit a new rule. This can include data users expect to keep. Do not proceed to the next step until you’re sure the rule is configured correctly. 
  10. Click Save. If your retention rule will expunge messages, Vault asks you to confirm you understand the effects of this retention rule. Check the boxes and click Confirm to create the rule.

Important notes

  • Email aliases in the Terms field—An email alias is an alternative email address that points to a primary email address. Custom retention rules don't automatically include email aliases. If you want to include email aliases, you must add them to the Terms field.
  • Renamed users—Custom retention rules aren't automatically modified when users are renamed. The retention rule continues to apply only to addresses that are explicitly in the Terms field of the rule. For example, if a rule applies to messages that include before@example.com and that user is renamed after@example.com, the retention rule applies only to messages sent to before@example.com.
  • Modifying a custom retention rule—You can modify a custom rule, but you must understand how that modification might impact retained data. Data is retained according to the latest version of the retention rule.

Set the default retention rule for Gmail

The default retention rule applies to all messages that aren't covered by a custom rule or a hold.

To set the default retention rule for Gmail:

  1. Sign in to Vault.
  2. In the left navigation, click Retention.
  3. Under Default retention rules, click Mail.
  4. Check the Set a default retention rule box.
  5. Choose how long to keep messages:
    • Choose Indefinitely to permanently retain data.
    • To discard messages after a period of time, enter the number of days, from 1 to 36,500.
  6. If you set a duration, choose what to do with messages after the retention period expires:
    • Choose the first option to expunge only the messages that users have already deleted.
    • Choose the second option to expunge all messages. This includes messages that are in users’ inboxes. It also includes messages that have already been deleted.
    Warning: Vault immediately begins the process of purging data that exceeds the default retention coverage period as soon as you submit this rule. This can include data users expect to keep. Do not proceed to the next step until you’re sure the rule is configured correctly. 
  7. Click Save. If your retention rule will expunge messages, Vault asks you to confirm you understand the effects of this retention rule. Check the boxes and click Confirm to create the rule.
Was this helpful?
How can we improve it?