Delete only internal emails

204 views
Skip to first unread message

Yossi Kass

unread,
Sep 18, 2023, 3:39:44 PM9/18/23
to GAM for Google Workspace
Hi everyone; I have a unique scenario and trying to wrap my head around it. 

I have been requested to delete only internal emails (From and To within our domain, not a cc'ed or bcc'ed) without attachments, and the emails are older than 15 months from a specific date.

Is this currently possible? This is out of my comfort zone, and I am hoping with some scripting this can be done. Ty!

Jay Lee

unread,
Sep 18, 2023, 3:42:45 PM9/18/23
to google-ap...@googlegroups.com
This is a job for Google Vault. Work with your legal team to define your archiving and retention policies in Google Vault so that this is handled automatically.


You could try doing this with GAM and Gmail searches but that's a manual effort and would not cover any mail Vault is already retaining/holding.

Jay

--
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/9d344ee6-8c53-48f6-946f-abcc1fdc7cf0n%40googlegroups.com.

GAM for Google Workspace

unread,
Sep 18, 2023, 5:09:44 PM9/18/23
to GAM for Google Workspace
So, I looked into Vault, which uses the same search parameters as Gmail and have worked out the parameters; however, in Vault, it deletes the whole conversation, which also pulls emails that do not meet the search parameters. 

from:domain.com to: domain.com   -has:attachment -cc: domain.com -bcc:domain.com

That's why I was looking into GAM. Do you know a way around this to have Vault only delete the actual messages that meet the search criteria?

Reply all
Reply to author
Forward
0 new messages