Git Product home page Git Product logo

Comments (11)

eesheesh avatar eesheesh commented on April 27, 2024 1

I think I understand the issue - I tried exporting from Apple Mail 10.3 by right-clicking a folder ("mailbox" in Apple Mail terminology) and selecting "Export Mailbox...", and the resulting mbox file includes the attachments as expected (note that you can select multiple folders). Please try doing that instead of pointing at the Library/Mail subfolder and let me know if that works.

from import-mailbox-to-gmail.

eesheesh avatar eesheesh commented on April 27, 2024 1

Thanks for the update Justin! You're right, in my test I exported from a live account (connected to a G Suite account). I haven't tried exporting from an offline account. If that's indeed the source on the issue, I agree that we have to wait for Apple to fix this, or provide a workaround.

from import-mailbox-to-gmail.

eesheesh avatar eesheesh commented on April 27, 2024

No, attachments should be imported as usual... I'd suggest the following steps to investigate the issue:

  1. Create an mbox file with just one message that should be affected (i.e. has an attachment). Make sure it doesn't already exist in the target account, if it does it will be ignored by Gmail on import.
  2. View the mbox file in a text editor and ensure the attachment is indeed there.
  3. Run the script with the --httplib2debuglevel=4 argument, this will make it log the entire request, if I remember correctly.
  4. After the script finishes, check the log and ensure the attachment was indeed included in the uploaded message.
  5. Check Gmail and see if the attachment appears in the message. If it doesn't, use 'Show original' in Gmail and download the message source (don't copy and paste - that's not the same).
  6. Open the message source and see if it's identical to the source message you hd in the mbox.

Let me know what you find in each step, and I hope we can pinpoint the issue. :) Thanks!

from import-mailbox-to-gmail.

jwebbstevens avatar jwebbstevens commented on April 27, 2024

That's good. Thanks for the quick response.

I believe the issue is with Apple Mail.

When I export a mailbox it doesn't seem to include messages with attachements.
It's also exhibiting some wierd behavior as well. When I move messages in and out of the trash folder in Apple Mail and export the mailbox it seems to preserve the messages that are out but still excludes messages with attachements.

I'll try and rebuild the mailbox some how or reboot and clear caches. What's odd is these messages live just on my computer so I don't know why it's not easier to manage mailboxes with Apple Mail. I guess that's just an apple design flaw.

I'll run the debuglevel=4 sequence once I am able to target and actually get a message with an attachment in an exported mbox format properly.

from import-mailbox-to-gmail.

jwebbstevens avatar jwebbstevens commented on April 27, 2024

Yeah. I have confirmed what I thought might be going on.

When I use Apple Mail to Export the mbox it just exports the message. It doesn't export the attachments.

When I look at the folder structure of the mail messages in Go>Library>Mail>V5>Maibox>All Mail.mbox the file structure has a folder called Attachments in that folder directly in Apple Mail is a large quantity of folders with each one containing a large quantity of subfolders. They all have names like 1, 2, 9 and so on. Within each of those folders the attachments are found. They are openable editable and movable and so on. So they exist properly and natively in Apple Mail program and are accessible.

But it looks like that when using Apple Mail's Export function to an mbox the attachments are not included. The only thing the Apple Mail Export does is create a folder and the mbox and then a file called table_of_contents.

¯_(ツ)_/¯

from import-mailbox-to-gmail.

jwebbstevens avatar jwebbstevens commented on April 27, 2024

@eesheesh Thanks but that doesn't work for me. Here's what I am doing step by step currently with Apple Mail. I don't go directly into the Library/Mail/Subfolders. I use the Apple Mail application on a MacBook.

Here are the specs too for device and application:

  • Apple Mail - Version 11.2 (3445.5.20)
  • MacOS - High Sierra Version 10.3.2

Steps I took to export mbox file in Apple Mail.

  • Navigate to Apple Mail
  • Navigate to a mailbox in Apple Mail terminology (Trash in this example)
  • Right-click to expose menue
  • Export Mailbox...

export mailbox

  • Choose a destination Folder (I chose a folder on my desktop)
  • The resulting file is nested in the folder with one output file
  • That file is called Trash.mbox
  • When I drill into that file it has two files
  • mbox and table_of_contents

This behavior is the same whatever mailbox I choose in Apple Mail, whether its All Mail or Inbox or whatever.

I asked the question on Apple Support Community as well and haven't gotten a response. I'm curious if behavior is different with Versions. I see you suceed using Apple Mail 10.3, on 11.2 it doesn't work though as expected.

It might be a legitimate defect with the latest version of Apple Mail.

Regarding Library/Mail/Subfolders approach I don't think that works as the python script and readme says you can't just copy an mbox folder because it won't be formatted for the script properly. I even tried it since int he Library/Mail/Subfolders one can definately see the distinct Apple Mailboxes and the messages and the attachements related to said message.

I'll keep pestering Apple and see if they know what's going on. My money is on a flaw being in the latest version of High Sierra's Apple Mail. I could be wrong though.

from import-mailbox-to-gmail.

jwebbstevens avatar jwebbstevens commented on April 27, 2024

@eesheesh I reported this to Apple and the Engineers are looking into it. It also appears to be a bug that others are experiencing so I'm guessing it won't work until the issue a patch or confirm that the Export process now no longer includes attachments as a feature. I'll let you know what they tell me. For now the Export Apple Mail .mbox doesn't work to include attachments in the exported .mbox on Version 11.2 (3445.5.20) of High Sierra 10.3.2.

from import-mailbox-to-gmail.

eesheesh avatar eesheesh commented on April 27, 2024

Hi,

I tested with Version 11.2 (3445.5.20) and I do get attachments in the export, but based on what you say it sounds like an overall issue with Apple Mail, so I'm going to close this issue - please let me know if you still have any problems after Apple Mail exports gets fixed and I can reopen if needed.

Sorry about the Library/Mail subfolder reference, I thought you were using that instead of the export feature for some reason, but reading your previous comments again it's clear you weren't doing that. 😄

from import-mailbox-to-gmail.

eesheesh avatar eesheesh commented on April 27, 2024

Can you post the link to the discussion on with Apple, if possible? Thanks!

from import-mailbox-to-gmail.

jwebbstevens avatar jwebbstevens commented on April 27, 2024

yep, here it is Attachments missing from Mailbox Export - mbox file.

Most of my discussion is directly with Apple Support engineers. We're onto the second disk image, the first one I got them before the 10.13.3 upgrade that Apple pushed out on the 24th, the second is from after. They are looking into it and the Sr. Support person said he would get back to me Monday (1/29/2018) so we'll see what they say then.

from import-mailbox-to-gmail.

jwebbstevens avatar jwebbstevens commented on April 27, 2024

@eesheesh So Apple Support Engineers got back to me after the second disk image.

It looks like this is an apple issue. Namely, when I create a fresh mailbox and try and transfer a message to that new apple mail mailbox Apple Mail alerts that the connected email account is offline. (recall this mail was downloaded to the local client as a back up and is no longer connected to the email account that it once was).

So it appears that because the email account isn't actually connected to a "live email". Apple Mail can't attach the attachments to the .mbox file upon export even though, the attachements live on the local machine in Apple Mails own mailbox file architecture as full files.

I'm curious when you tested this in previous versions of Apple Mail and that it did work is your email connected to an email account (like Gmail or Protonmail or the like?).

If that is the missing link then its on apple mail to fix. If indeed, one has to have a connected live email account, then its by design that Apple Mail prohibits the creation of an .mbox file will full attachments and just creates the messages. Which seems silly, so maybe I can get them to fix that. It shouldn't matter if an account is live or not, all the email files and attachments live on the local client.

from import-mailbox-to-gmail.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.