[Feature request] restore-mbox: recreate labels from the mbox files and directories names

1,385 views
Skip to first unread message

Fred Garz

unread,
Jun 16, 2020, 1:13:14 PM6/16/20
to Got Your Back: Gmail Backup
Hello,

I came across gyb while I was looking for a way to import to GSuite / Gmail all my email archives (starting in 1996...). I switched to the Gmail web & mobile apps from Thunderbird a while ago, and all my archived emails are stored locally in thunderbird in "Local Folders", with dozens of folders and sub-folders organized by job, year, projects, etc.

Thunderbird email folders are stored in a directory/files on disk in mbox format, with specific names and extensions for folders and sub folders : 
24905559        0 drwxr-xr-x    5 fgarzon          staff                 160 Jun 16 17:23 .
24908553        0 drwx------    4 fgarzon          staff                 128 Jun 16 17:23 ./Folder1.sbd
24908554        8 -rw-r--r--    1 fgarzon          staff                3674 Jun 16 17:24 ./Folder1.sbd/Sub folder.msf
24908555        8 -rw-------    1 fgarzon          staff                1188 Jun 16 17:24 ./Folder1.sbd/Sub folder
24908552        8 -rw-r--r--    1 fgarzon          staff                3673 Jun 16 17:24 ./Folder1.msf
24908551        8 -rw-------    1 fgarzon          staff                1188 Jun 16 17:24 ./Folder1

An email folder is represented on disk as an mbox file storing messages (the name of the file is the name of the mail folder, with an extran index file with the .msf extension). If the email folder contains subfolders, they are stored in a sub-directory with the .sbd extension.

I know gyb is able to restore mbox files from Google Takeout, and recreate the folder hierarchy from the  X-Gmail-Labels header in each message of the mbox file.
I would like gyb to have the "import from thunderbird" extension, or an option to recreate the label hierarchy in gmail from the directory/file structure of the --local-folder directory (I could rename the mbox files with an .mbox extension and remove the .sbd extension to make it easier and less thunderbird specific...). 

Is it a feature that has already been requested ? I would be interested to code it, but I am new to python (I am more of a ruby/perl type, I apologize in advance ;-), is there a starting place where I can learn how to contribute to the project ? 

Thank you in advance.

Marcus Frank

unread,
May 28, 2021, 11:32:18 AM5/28/21
to Got Your Back: Gmail Backup
Hello,

I have basically the same use case and would love to know if there are any plans by now to implement it?

Cheers
Marcus

Jay Lee

unread,
May 28, 2021, 11:33:12 AM5/28/21
to Got Your Back: Gmail Backup
No plans but pull requests are always welcome.

--
--
You received this message because you are subscribed to the Google
Groups "Got Your Back: Gmail Backup" group.
To post to this group, send email to got-yo...@googlegroups.com
To unsubscribe from this group, send email to
got-your-bac...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/got-your-back?hl=en?hl=en

---
You received this message because you are subscribed to the Google Groups "Got Your Back: Gmail Backup" group.
To unsubscribe from this group and stop receiving emails from it, send an email to got-your-bac...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/got-your-back/02a7eb27-0da3-4e50-a5e4-085788d8b9e9n%40googlegroups.com.

Alessio Sugoni

unread,
Jul 9, 2021, 9:31:20 AM7/9/21
to Got Your Back: Gmail Backup
Hey,

I have exactly the same usecase, and this would be a killer feature, paired with a couple of scripts to correctly organize the files GYB would really become a must-have.

Hope you're going to take this feature in consideration!
INFORMATIVA SULLA PRIVACY E SULLA CONFIDENZIALITA': Ai sensi del Reg. UE n.2016/679 sulla tutela della privacy, Vi informiamo che il presente messaggio e-mail potrebbe contenere informazioni riservate e/o fondate su privilegio legale, oltre a dati personali. Vi informiamo che deteniamo e trattiamo i dati contenuti nella presente per i soli scopi di adempiere ad obblighi di legge e/o contrattuali e/o per la tutela di nostri legittimi interessi. La conoscenza di questi dati è riservata ai soli destinatari di questa e-mail. Al di fuori degli scopi sopra descritti, tali dati non saranno da noi rivelati in alcun modo a terzi, senza il previo consenso scritto degli interessati coinvolti, ove prescritto e/o necessario ai sensi della legge applicabile. Qualora Voi non siate gli effettivi destinatari della presente e-mail, Vi informiamo che ne sono severamente proibite la diffusione, la copia e/o la distribuzione. Nel caso aveste ricevuto il presente messaggio per errore Vi preghiamo, pertanto, di informarci immediatamente e di eliminarlo dal vostro computer. Grazie.

PRIVACY AND CONFIDENTIALITY NOTICE: Pursuant to EU Regulation no.679/2016 on privacy protection, we inform You that his e-mail message might contain confidential and/or legally privileged information as well as personal data. We inform You that we hold and process all data contained therein for the sole purposes of meeting legal and/or contractual obligation(s) and/or for our legitimate interest. Knowledge of these data is reserved solely to the person(s) to whom this e-mail is addressed. Outside the scopes described above, these data will not be disclosed by us in any way to third parties without the prior written consent of the relevant data subject(s), where prescribed and/or deemed necessary by applicable law(s). If You are not the intended recipient, You are hereby notified that any disclosure, copying and/or distribution of the contents of this e-mail message is strictly prohibited. If You have received this communication in error, therefore, please delete it immediately and contact us to let us know it. Thank you.


Reply all
Reply to author
Forward
0 new messages