How to use these two Python/Perl scripts to migrate a GMail inbox to a cpanel / dovecot / maildir inbox — when you have a lot of emails and other, simpler, imports fail.
You'll need FTP and SSH access to the server; or, if you can't connect over SSH, make sure there's a file manager that permits unzipping in your host's admin interface.
./mbox_split.py --infile google_mbox.mbox --prefix split_
You may need to chmod 755 mbox_split.py
to be able to run.
Alternatively, you can just export by label from Google Takeout directly.
./mb2md.pl -s ~/path/to/split_Inbox.mbox -d ~/path/to/output/Inbox
Notes:
- may need
chmod 755 mbox_split.py
to be able to run - source and destination need absolute paths
unzip -j Inbox.zip
rm Inbox.zip
(The -j
flag will make sure the zipped new
folder will extract in-place, with no additional folder structure)