Delete Email from Trash?

101 views
Skip to first unread message

Casey Fowler

unread,
May 8, 2024, 2:54:13 AM5/8/24
to GAM for Google Workspace
We had a student send sensitive data to a class group email, accidentally.

I used another email security tool to trash that email, which successfully removed it from user inboxes, but it is still in their trash.

Without having to empty the trash of all these users, can GAM delete an email from trash?

I've already attempted to use:

gam group <Group Email Address> delete messages query "rfc822msgid:<message ID>" doit


This looked like it worked its way through each email with a succesful delete message, but the email still appears in the trash.

Is it possible to delete an email from trash with GAM?

Ross Scroggs

unread,
May 8, 2024, 10:14:40 AM5/8/24
to google-ap...@googlegroups.com
delete messages tells the API to process messages in the trash so that shouldn't be the issue.
I wonder if multiple copies of the message are in the trash?
Add this after doit: maxtodelete 100

Ross
----
Ross Scroggs



--
You received this message because you are subscribed to the Google Groups "GAM for Google Workspace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/21cc5be9-0fc4-4c5e-a47e-35e920480d05n%40googlegroups.com.

Jay Lee

unread,
May 8, 2024, 10:57:59 AM5/8/24
to google-ap...@googlegroups.com

Add in:anywhere to the query so Gmail searches for the message in trash:

gam group <Group Email Address> delete messages query "rfc822msgid:<message ID> in:anywhere" doit


Reply all
Reply to author
Forward
0 new messages