Is there a way to start the first sync using the emails downloaded with google takeout?
Closed this issue · 3 comments
I have a lot of emails (I suspect, everyone does) and the first sync takes a long time with the api limits. One way I can imagine reducing this is by using an existing state from google takeout for gmail. It gives you mbox
format emails but it's trivial to convert those to maildir
.
I see that lieer
uses the historyId
from the gmail api. I want to understand if lieer would automatically pick the maildir with already existing emails in them and what would be the steps to do this.
If this functionality does not exist, I would like to implement it with some guidance. :-)
The file names have to match the ones expected by lieer, then you do a full metadata sync but you don't have to download all the message content. That should make a significant difference.
Is there a set expectation for the filenames outside of the general maildir
format?
Also, I didn't quite get it. Does it do it today already or does it need to be implemented? I'm confused because from the code, it seems like it just does a full_sync
if the historyId
does not exist but from your comment, it seems like it does..
It needs to do a full sync, but it does not have to download the messages. Only the metadata like tags/labels. That information is probably not in your maildir/mbox already.