Removing Emails with Labels from Inbox After Migrating

137 views
Skip to first unread message

Zachary Tyler Raposo

unread,
Aug 27, 2018, 7:40:05 PM8/27/18
to GAM for G Suite
Hello,

I was doing a backup with some terminated users and restoring it to another user's mailbox of the terminated users I backed up. The issue I ran into is that all the messages went into the user's inbox with the label I gave attached to it which is fine but I would like to have all the restored messages in only the label I created and not in the label and inbox. Is there a way to have the restored messages in the inbox removed while keeping the label attached? Not sure if this something that is more GYB or GAM related if it is possible for what I need to do. The command I used when restoring the emails was gyb --email us...@domain.com --action restore --label-restored <Label_Name> --local-folder <File_Location> --service-account --debug > File_Location\File_Name.csv

Thank you,

Jay Lee

unread,
Aug 27, 2018, 8:21:17 PM8/27/18
to google-ap...@googlegroups.com
Try:

gam user <email> modify messages query "in:inbox has:userlabels" removelabels Inbox

If the numbers look good add the doit and maxtomodify parameters:


Jay

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.
To post to this group, send email to google-ap...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/59fec95b-e02c-4430-b900-34fb62dde9da%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Zachary Tyler Raposo

unread,
Aug 27, 2018, 8:36:41 PM8/27/18
to GAM for G Suite
Thank you so much for the reply. For the maxtomodify paramater what number is it that I exactly am wanting to enter in? Do I use your command gam user <email> modify messages query "in:inbox has:userlabels" removelabels Inbox then run it again with doit including the number it gives me from the command I entered? So sorry for the silly question I'm still learning quite a bit with GAM.


On Monday, August 27, 2018 at 5:21:17 PM UTC-7, Jay Lee wrote:
Try:

gam user <email> modify messages query "in:inbox has:userlabels" removelabels Inbox

If the numbers look good add the doit and maxtomodify parameters:


Jay

On Mon, Aug 27, 2018, 7:40 PM Zachary Tyler Raposo <raposo....@gene.com> wrote:
Hello,

I was doing a backup with some terminated users and restoring it to another user's mailbox of the terminated users I backed up. The issue I ran into is that all the messages went into the user's inbox with the label I gave attached to it which is fine but I would like to have all the restored messages in only the label I created and not in the label and inbox. Is there a way to have the restored messages in the inbox removed while keeping the label attached? Not sure if this something that is more GYB or GAM related if it is possible for what I need to do. The command I used when restoring the emails was gyb --email us...@domain.com --action restore --label-restored <Label_Name> --local-folder <File_Location> --service-account --debug > File_Location\File_Name.csv

Thank you,

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.

Jay Lee

unread,
Aug 27, 2018, 8:40:23 PM8/27/18
to google-ap...@googlegroups.com
Max to modify just prevents Gam from doing more damage if you make a mistake. Yes, you can just set it to the number returned, yes.

Jay

On Mon, Aug 27, 2018, 8:36 PM Zachary Tyler Raposo <raposo....@gene.com> wrote:
Thank you so much for the reply. For the maxtomodify paramater what number is it that I exactly am wanting to enter in? Do I use your command gam user <email> modify messages query "in:inbox has:userlabels" removelabels Inbox then run it again with doit including the number it gives me from the command I entered? So sorry for the silly question I'm still learning quite a bit with GAM.

On Monday, August 27, 2018 at 5:21:17 PM UTC-7, Jay Lee wrote:
Try:

gam user <email> modify messages query "in:inbox has:userlabels" removelabels Inbox

If the numbers look good add the doit and maxtomodify parameters:


Jay

On Mon, Aug 27, 2018, 7:40 PM Zachary Tyler Raposo <raposo....@gene.com> wrote:
Hello,

I was doing a backup with some terminated users and restoring it to another user's mailbox of the terminated users I backed up. The issue I ran into is that all the messages went into the user's inbox with the label I gave attached to it which is fine but I would like to have all the restored messages in only the label I created and not in the label and inbox. Is there a way to have the restored messages in the inbox removed while keeping the label attached? Not sure if this something that is more GYB or GAM related if it is possible for what I need to do. The command I used when restoring the emails was gyb --email us...@domain.com --action restore --label-restored <Label_Name> --local-folder <File_Location> --service-account --debug > File_Location\File_Name.csv

Thank you,

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.

To post to this group, send email to google-ap...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.

Zachary Tyler Raposo

unread,
Aug 27, 2018, 8:46:18 PM8/27/18
to GAM for G Suite
Perfect, I'll try this tomorrow and see how it goes. Thank you again.


On Monday, August 27, 2018 at 5:40:23 PM UTC-7, Jay Lee wrote:
Max to modify just prevents Gam from doing more damage if you make a mistake. Yes, you can just set it to the number returned, yes.

Jay

On Mon, Aug 27, 2018, 8:36 PM Zachary Tyler Raposo <raposo....@gene.com> wrote:
Thank you so much for the reply. For the maxtomodify paramater what number is it that I exactly am wanting to enter in? Do I use your command gam user <email> modify messages query "in:inbox has:userlabels" removelabels Inbox then run it again with doit including the number it gives me from the command I entered? So sorry for the silly question I'm still learning quite a bit with GAM.

On Monday, August 27, 2018 at 5:21:17 PM UTC-7, Jay Lee wrote:
Try:

gam user <email> modify messages query "in:inbox has:userlabels" removelabels Inbox

If the numbers look good add the doit and maxtomodify parameters:


Jay

On Mon, Aug 27, 2018, 7:40 PM Zachary Tyler Raposo <raposo....@gene.com> wrote:
Hello,

I was doing a backup with some terminated users and restoring it to another user's mailbox of the terminated users I backed up. The issue I ran into is that all the messages went into the user's inbox with the label I gave attached to it which is fine but I would like to have all the restored messages in only the label I created and not in the label and inbox. Is there a way to have the restored messages in the inbox removed while keeping the label attached? Not sure if this something that is more GYB or GAM related if it is possible for what I need to do. The command I used when restoring the emails was gyb --email us...@domain.com --action restore --label-restored <Label_Name> --local-folder <File_Location> --service-account --debug > File_Location\File_Name.csv

Thank you,

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages