Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9010829
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T02:33:59+00:00 2026-06-16T02:33:59+00:00

I am trying to replicate a Google Apps mailbox into another Google account. I

  • 0

I am trying to replicate a Google Apps mailbox into another Google account. I am using the IMAP library in Python.

I am able to get a unique UID for each mailbox. I could, download each message from each mailbox using thie UID.

The problem is that the unique UID is per mailbox, not per account. For example, one email may reside in two mailboxes, or have two labels. It will show up as two separate UIDs. If I download the email twice, they are no longer the same email. When one is deleted, the other will remain, etc.

Gmail has a X-GM-MSGID which gives a unique ID per the account.

At the moment, the only way I know of getting this X-GM-MSGID is by first getting the UID and requesting it’s X-GM-MSGID. If the inbox has 10,000 emails, this will become a lot of requests. Is there a another way to get the X-GM-MSGID of all emails in an inbox, or even better, of all mailboxes?

I believe once I have the unique ID of each email, I can then FETCH the flags, time and content of each email and APPEND it onto the new server.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T02:34:01+00:00Added an answer on June 16, 2026 at 2:34 am

    You can get multiple X-GM-MSGIDs using a bulk fetch:

    FETCH 1:* X-GM-MSGID
    

    However, there is a better approach.
    Operate entirely within the All Mail folder (\AllMail from XLIST), and FETCH and STORE the X-GM-LABELS for each message.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Trying to replicate the Implicit Iterators in Python, using JavaScript my code doesn't return
I'm trying to replicate the following exemple : http://www.leigeber.com/2008/04/map-your-users-using-the-google-maps-api-and-php/ How to integrate this PHP
I am trying to get Marker Manager to work on Google Maps V3. I've
Trying to replicate the following query using Zend_Db_Select . Any pointers? SELECT compounds.id as
I am trying replicate auto-complete functionality that you find on the Google homepage. So,
I'd like to use jQuery with Google maps. I'm trying to replicate this example
I am trying to replicate the IF function from MySQL into PostgreSQL. The syntax
I am trying to replicate this demo code: https://developers.google.com/fusiontables/docs/samples/circle_example?hl=en which uses a FusionTablesLayer to
I'm trying to replicate at least some of the functionality of Workgroup Manager using
I'm trying to replicate pages like the following using Drupal: http://www.ams-neve.com/Products/Outboard/1073LB/1073LB.aspx My problem is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.