Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apple mail export .mbox problem? #15

Closed
okcomputer-1 opened this issue Jul 1, 2016 · 7 comments
Closed

Apple mail export .mbox problem? #15

okcomputer-1 opened this issue Jul 1, 2016 · 7 comments

Comments

@okcomputer-1
Copy link

I am trying to migrate mbox files that I exported from the Apple mail software.
However, the system says can't process mbox files for user xxxx@yyyy.com
And then says:

IOErrr: [Errno 21] Is a directory: "Users/.../..../ xxxxx.mbox'

I have the fear that the Apple does not extract compatible mbox files for the migration. Any help is welcome.

@eesheesh
Copy link
Collaborator

eesheesh commented Jul 1, 2016

Can you share the full log file (after redacting any private information)?

@okcomputer-1
Copy link
Author

2016-07-01T16:33:46 (+0100) 2933 INFO main (import-mailbox-to-gmail.py:285) *** Starting import-mailbox-to-gmail 1.3 on Python 2.7.12 (v2.7.12:d33e0cf91556, Jun 26 2016, 12:10:39)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] ***
2016-07-01T16:33:46 (+0100) 2933 INFO main (import-mailbox-to-gmail.py:286) Arguments:
2016-07-01T16:33:46 (+0100) 2933 INFO main (import-mailbox-to-gmail.py:288) auth_host_name: 'localhost'
2016-07-01T16:33:46 (+0100) 2933 INFO main (import-mailbox-to-gmail.py:288) auth_host_port: [8080, 8090]
2016-07-01T16:33:46 (+0100) 2933 INFO main (import-mailbox-to-gmail.py:288) dir: '/Users/username/Downloads/Gmail_migration/mbox/'
2016-07-01T16:33:46 (+0100) 2933 INFO main (import-mailbox-to-gmail.py:288) fix_msgid: True
2016-07-01T16:33:46 (+0100) 2933 INFO main (import-mailbox-to-gmail.py:288) httplib2debuglevel: 0
2016-07-01T16:33:46 (+0100) 2933 INFO main (import-mailbox-to-gmail.py:288) json: 'Credentials.json'
2016-07-01T16:33:46 (+0100) 2933 INFO main (import-mailbox-to-gmail.py:288) log: 'import-mailbox-to-gmail-2933.log'
2016-07-01T16:33:46 (+0100) 2933 INFO main (import-mailbox-to-gmail.py:288) logging_level: 'INFO'
2016-07-01T16:33:46 (+0100) 2933 INFO main (import-mailbox-to-gmail.py:288) noauth_local_webserver: False
2016-07-01T16:33:46 (+0100) 2933 INFO main (import-mailbox-to-gmail.py:288) num_retries: 10
2016-07-01T16:33:46 (+0100) 2933 INFO main (import-mailbox-to-gmail.py:288) replace_quoted_printable: True
2016-07-01T16:33:46 (+0100) 2933 INFO main (import-mailbox-to-gmail.py:301) Processing user email@account.com
2016-07-01T16:33:46 (+0100) 2933 INFO method (discovery.py:822) URL being requested: GET https://www.googleapis.com/gmail/v1/users/email%40account.com/labels?fields=labels%28id%2Cname%29&alt=json
2016-07-01T16:33:46 (+0100) 2933 INFO new_request (client.py:614) Attempting refresh to obtain initial access_token
2016-07-01T16:33:46 (+0100) 2933 INFO _do_refresh_request (client.py:903) Refreshing access_token
2016-07-01T16:33:50 (+0100) 2933 INFO process_mbox_files (import-mailbox-to-gmail.py:174) Skipping '/Users/username/Downloads/Gmail_migration/mbox/email@account.com/.DS_Store' because it doesn't have a .mbox extension
2016-07-01T16:33:50 (+0100) 2933 INFO process_mbox_files (import-mailbox-to-gmail.py:176) Starting processing of '/Users/username/Downloads/Gmail_migration/mbox/email@account.com/Potentials.mbox'
2016-07-01T16:33:50 (+0100) 2933 ERROR main (import-mailbox-to-gmail.py:324) Can't process mbox files for user email@account.com
2016-07-01T16:33:50 (+0100) 2933 ERROR main (import-mailbox-to-gmail.py:347) Can't process user email@account.com
Traceback (most recent call last):
File "import-mailbox-to-gmail.py", line 322, in main
result = process_mbox_files(username, service, labels)
File "import-mailbox-to-gmail.py", line 179, in process_mbox_files
mbox = mailbox.mbox(full_filename)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/mailbox.py", line 832, in init
_mboxMMDF.init(self, path, factory, create)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/mailbox.py", line 571, in init
f = open(self._path, 'rb+')
IOError: [Errno 21] Is a directory: '/Users/username/Downloads/Gmail_migration/mbox/email@account.com/xxx.mbox'
2016-07-01T16:33:50 (+0100) 2933 INFO main (import-mailbox-to-gmail.py:348) *** Done importing all users from directory '/Users/username/Downloads/Gmail_migration/mbox/'
2016-07-01T16:33:50 (+0100) 2933 INFO main (import-mailbox-to-gmail.py:349) *** Import summary:
2016-07-01T16:33:50 (+0100) 2933 INFO main (import-mailbox-to-gmail.py:351) 0 users imported with no failures
2016-07-01T16:33:50 (+0100) 2933 INFO main (import-mailbox-to-gmail.py:353) 0 users imported with some failures
2016-07-01T16:33:50 (+0100) 2933 INFO main (import-mailbox-to-gmail.py:355) 1 users failed
2016-07-01T16:33:50 (+0100) 2933 INFO main (import-mailbox-to-gmail.py:357) 0 labels (mbox files) imported with no failures
2016-07-01T16:33:50 (+0100) 2933 INFO main (import-mailbox-to-gmail.py:359) 0 labels (mbox files) imported with some failures
2016-07-01T16:33:50 (+0100) 2933 INFO main (import-mailbox-to-gmail.py:361) 0 labels (mbox files) failed
2016-07-01T16:33:50 (+0100) 2933 INFO main (import-mailbox-to-gmail.py:363) 0 messages imported successfully
2016-07-01T16:33:50 (+0100) 2933 INFO main (import-mailbox-to-gmail.py:365) 0 messages failed

2016-07-01T16:33:50 (+0100) 2933 INFO main (import-mailbox-to-gmail.py:368) *** Check log file import-mailbox-to-gmail-2933.log for detailed errors.
2016-07-01T16:33:50 (+0100) 2933 INFO main (import-mailbox-to-gmail.py:369) Finished.

@brianebeyer
Copy link

The .mbox file you're looking for to import is inside the "xxxx.mbox" directory created by your Apple Mail export.

@yaaax
Copy link

yaaax commented Mar 13, 2017

Thanks @brianebeyer, that made my day !

@eesheesh
Copy link
Collaborator

Thanks @brianebeyer!

@priyaruby86
Copy link

If you want to import apple mails .mbox file to gmail account, then read this blog, it may help you: https://tech-vita.blogspot.com/2018/12/how-to-import-mbox-to-gmail.html

@eesheesh
Copy link
Collaborator

eesheesh commented Apr 2, 2019

Note that importing large amounts of mail using IMAP (as that post suggests) isn't recommended, as Gmail IMAP upload limit is quite small - 500mb per day.

Also, that post suggests using a username+password, which isn't as secure as using OAuth (which Thunderbird supports).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants