GSuite provides a number of different migration tools, you don't have to roll your own.
https://support.google.com/a/answer/6251069?hl=en If it's to consumer accounts, you may need to roll your own. You can use the pop fetcher, but that won't maintain the folder structure (and assumes you can present the full mailbox to pop, that's the default with Gmail, but may not be the case for other IMAP services). I kept meaning to have a header which could specify the labels to apply, but never got around to it. Also, for GSuite, you can avoid collecting the passwords of the destination accounts and use OAUTH (via SASL OAUTHBEARER) with a service account. Unfortunately, regular IMAP AUTH on Gmail doesn't support separate authz/authn with passwords. https://developers.google.com/identity/protocols/OAuth2ServiceAccount hmm, doesn't look like they wrote an OAUTHBEARER page for Gmail IMAP, there's just the older XOAUTH2 one: https://developers.google.com/gmail/imap/xoauth2-protocol XOAUTH2 was from a draft release of OAUTHBEARER, so the changes should be minimal. That page also talks about domain-wide delegation. The limits you're referring to are listed here: https://support.google.com/a/answer/1071518?hl=en The real limits are more complicated than that, the ones listed there are the daily limits. There are also longer term limits which are related to the size of the mailbox. Ie, for download, once you exceed the daily limit, you start working on the longer limit, which allows for downloading the entire mailbox about 5 times in 3 months (ie, it's related to the mailbox size, and the three months is the time it takes for the full limit to regen, but it's not a linear thing). The complicated nature of those limits are one reason they're not listed on that page, though it mentions you can download the mailbox 3 times (the code is I think 5.5, but with All Mail, some clients will download everything twice...) The same is true for the uploads, which is also related to the existing size of the mailbox, which is itself kind of weird (the more you upload, the more you can upload...) If you really want, you can also go the route of writing your own using the Gmail API, not sure if that gains you much, though. Brandon On Fri, Dec 15, 2017 at 2:53 PM John Levine <jo...@taugh.com> wrote: > In article <da7ace6f-a18d-a1ed-b98f-5819ada7e...@lscg.ucsb.edu> you write: > >On 12/15/2017 12:27 PM, Steve Atkins wrote: > >imapsync has a --gmail flag that handles all of the uniquenesses of > >Gmail. I've used it many times to migrate things. > > The target is indeed gmail. The client has 20 users, most of whom > have between 5 and 15 GB in their various subfolders. (It's a design > firm, they send around a lot of autocad files.) > > Gmail says they have a 500 MB/day IMAP upload limit, and imapsync will > throttle to stay under that limit so a 10 GB mailbox would take three > weeks. Really? Ugh. > > R's, > JOhn > -- > Regards, > John Levine, jo...@iecc.com, Primary Perpetrator of "The Internet for > Dummies", > Please consider the environment before reading this e-mail. https://jl.ly > > _______________________________________________ > mailop mailing list > mailop@mailop.org > https://chilli.nosignal.org/cgi-bin/mailman/listinfo/mailop >
_______________________________________________ mailop mailing list mailop@mailop.org https://chilli.nosignal.org/cgi-bin/mailman/listinfo/mailop