Screaming.Pict

Q: Mail.app- 'Remove Attachments' corrupting mails

I have a weird issue that I've not seen mentioned anywhere. Wondering if anyone can give me any debugging tips.

 

I'm using Mail 5.0 in Lion 10.6.1 (issue was occurring in 10.6.0 as well).

 

I have Mail connected to Exchange Server 2010.

 

I have a fairly tight restriction on mailbox sizes so I have to remove attachments from emails before I file them.

 

My problem is this; about 1 in 3 times I remove an attachment the 'replacement' e-mail is full of gibberish characters.

 

Typically if I look at the raw source of the e-mail then the text version of the mail is retained correctly- it seems to be the Base64 encoded version that is corrupted.

 

Any idea what I can do to debug this? I have tried removing the envelope files and removing/adding the account back in and re-syncing it but the issue has reappeared.

 

I've reported this to Apple on http://bugreports.apple.com but have not had a response.

 

Thanks in advance.

Unibody MacBook Pro 15" 2.8GHz, Mac OS X (10.6.1)

Posted on Aug 22, 2011 7:48 AM

Close

Q: Mail.app- 'Remove Attachments' corrupting mails

  • All replies
  • Helpful answers

first Previous Page 3 of 8 last Next
  • by felix the cat!,

    felix the cat! felix the cat! Dec 27, 2014 4:58 AM in response to 750 H2C
    Level 1 (0 points)
    Dec 27, 2014 4:58 AM in response to 750 H2C

    I am having the exact same problem with Mail.app 8.1 and Exchange Server.

     

    Until Yosemite I never noticed anything odd. But now the issue spreads so rapidly that I need to find a fix or alternative within days. I am scared that it may retroactively affect all my email. Several observations:

    1. Since Yosemite, "Remove attachment" is greyed out for any exchange email carrying an attachment, irrespective whether I am sender or recipient. To induce "Remove attachment" I thereof copy a POP/SMTP email from one of my other email accounts among them;
    2. To help mitigate the issue, I began moving exchange email to a local folder before deleting attachments. This doesn't however seem to curb the issue. It occurs even among local email where attachments were deleted 6, 12 or 18 months ago and where previously which I never saw having any issue (but I may be mistaken and simply didn't notice earlier);
    3. Affected are only email from where attachments where removed and where sender or at least 1 recipient use Exchange Server;
    4. Email content is always preserved in “Raw source”;
    5. Those weird characters (Chinese?) cannot be searched for;
    6. "Rebuild database” is able to render some recent deletes legible again, but only when flagged and shown under the respective Flag colour. Interestingly, the same email remains illegible in its local folder. But if known text of that email is searched for, Mail renders an accurate full view in the local folder.

     

    Any ideas?

     

    MacBook Pro (Retina, 13-inch, Late 2013), 2.6 GHz Intel Core i5, 10.10.1

  • by 750 H2C,

    750 H2C 750 H2C Jan 19, 2015 2:07 AM in response to catalan
    Level 1 (15 points)
    Mac OS X
    Jan 19, 2015 2:07 AM in response to catalan

    I should add that I have the same problem as catalan (disabled Remove Attachments menu command), described in this thread: https://discussions.apple.com/thread/3199150

     

    My solution is to move the sent message from my IMAP sent box to any local mailbox and then back to the server. After that, mail recognizes the attachment and makes it removable.

  • by 750 H2C,

    750 H2C 750 H2C Jan 20, 2015 12:44 AM in response to 750 H2C
    Level 1 (15 points)
    Mac OS X
    Jan 20, 2015 12:44 AM in response to 750 H2C

    The gibberish problem is accelerating for me. I've found that I have to restart Mail a few times each day to improve my odds of avoiding the problem, since Mail seems to be behaving better after a restart. Once the problem starts, though, the misbehaviour frequency goes up.

     

    I've also found that if I move the message to a local mailbox before removing the attachment, I'm often left with a blank message. No gibberish, but also no text at all. Not much better.

     

    Note that I'm working with a fresh installation of Yosemite with Mail set up from scratch (since I really wanted to get rid of this problem). No settings imported, just messages. The problem is still there. So it's not due to some crap settings in my computer.

     

    What I do right now is to create a reply to a message before attempting to remove its attachment. If I'm left with gibberish, the reply still contains the original message, albeit in a cited form. Better than nothing.

     

    I can also report that I tried an alternative email client today, Postbox 3, but its mailbox import function seemed to be less than reliable. Give me a few weeks to get more desperate, and I'll give it a serious try.

  • by puklars,

    puklars puklars Jan 20, 2015 3:38 AM in response to 750 H2C
    Level 1 (0 points)
    Jan 20, 2015 3:38 AM in response to 750 H2C

    I have OS X 10.9.5 and Mail 7.3 hooked up to my Gmail account via IMAP.


    I don't usually remove that many attachments, but when I do, the message vanishes completely from the Inbox. When I do a search for the message it seems to have ended up in the "Archive" folder - with two .txt files in place of the original attachment.

  • by dme26,

    dme26 dme26 Jan 27, 2015 10:50 PM in response to Screaming.Pict
    Level 1 (4 points)
    Jan 27, 2015 10:50 PM in response to Screaming.Pict

    I'm seeing the "Remove Attachments" (when not hitting the separate long-lived bug that causes that menu item to be incorrectly greyed out) cause corrupted message display increasingly frequently on an IMAP folder: just observed it on Mail.app 8.2 (2070.6) (on 10.10.2).

  • by Edward Tewkesbury,

    Edward Tewkesbury Edward Tewkesbury Jan 29, 2015 3:27 PM in response to dme26
    Level 1 (5 points)
    Jan 29, 2015 3:27 PM in response to dme26

    I, too, have seen a marked jump in Mail message corruption after removing attachments with Mail version 8.2 (2070.6) in 10.10.2. The corruption is random; I can't detect a pattern based on sender, action performed (prior reply, forwarding, etc.), or anything else obvious. The corruption appears as what looks like Chinese characters, interspersed with "?" encapsulated with solid black 4-cornered diamonds.

     

    I think this is a formatting or encryption problem: the text of the message can still be viewed through View>Message>Raw Source. However, the message, once corrupted, no longer appears in searches on message content.

     

    Mail 8.2 fixed a Yosemite fail with the junk mail filter, so 8.2 is sort of good news/bad news for me. But, as the time span of this thread shows, this corruption problem has existed much longer. From the results of the latest quarter, looks like the iPhones are attracting most of the talent and attention at Apple. Shame.

  • by dme26,

    dme26 dme26 Jan 29, 2015 9:49 PM in response to dme26
    Level 1 (4 points)
    Jan 29, 2015 9:49 PM in response to dme26

    I've just had the corruption occur again today from viewing the raw source in Mail.app, the result of the bug is obvious in this case. The raw message contains:

    --_002_C997BA54A3409B438E2B598544A3BFEE38DAA4AEITSEXMP07regist_
    Content-Transfer-Encoding: base64
    Content-Type: text/plain;
         charset=utf-8
    

    Which is followed by text content that is obviously not base64 encoded. So it seems that Mail.app is incorrectly changing the Content-Transfer-Encoding of parts of the multi-part message encoding that should not have changed. Oops. Oh well. I guess if I want to try to edit Mail.app's internal representation of the messages that it has broken...

  • by dme26,

    dme26 dme26 Jan 30, 2015 12:45 AM in response to dme26
    Level 1 (4 points)
    Jan 30, 2015 12:45 AM in response to dme26

    Just to close off what worked for me in this case: I fired up mutt; located the Mail.app-corrupted message; pressed e to edit the raw message on the server; made an appropriate tweak to the offending line (changed to Content-Transfer-Encoding: 8bit); message now displays correctly again.

  • by Edward Tewkesbury,

    Edward Tewkesbury Edward Tewkesbury Jan 30, 2015 10:11 AM in response to dme26
    Level 1 (5 points)
    Jan 30, 2015 10:11 AM in response to dme26

    Brilliant, dme26. Can't wait to give that a try myself.

     

    Apple? You listening? Our work as users is done here; the rest is up to you.

     

    (And, because Apple is almost certainly NOT listening, I urge anyone experiencing this message corruption report it, and this thread, on www.apple.com/feedback/mail.html.) Thanks.

  • by 750 H2C,

    750 H2C 750 H2C Feb 2, 2015 7:08 AM in response to dme26
    Level 1 (15 points)
    Mac OS X
    Feb 2, 2015 7:08 AM in response to dme26

    Haha, I tried the same thing with Text Edit. It worked.


    Move the corrupt message to a local mailbox (on your computer). Locate the message in Finder: ~Library/Mail/V2/Mailboxes… (might take some time if you have millions of messages and mailboxes, but some kind of clever Spotlight search might help.) Open the message in Text Edit, change "Content-Transfer-Encoding: base64" to "Content-Transfer-Encoding: 8bit". Open up Mail again and look at your message in awe.


    But, of course, this can't be done every time the corruption appears.

  • by 750 H2C,

    750 H2C 750 H2C Feb 2, 2015 7:14 AM in response to Edward Tewkesbury
    Level 1 (15 points)
    Mac OS X
    Feb 2, 2015 7:14 AM in response to Edward Tewkesbury

    Edward Tewkesbury wrote:

     

    (And, because Apple is almost certainly NOT listening, I urge anyone experiencing this message corruption report it, and this thread, on www.apple.com/feedback/mail.html.) Thanks.

    Have done so.

  • by 750 H2C,

    750 H2C 750 H2C Feb 2, 2015 11:55 PM in response to 750 H2C
    Level 1 (15 points)
    Mac OS X
    Feb 2, 2015 11:55 PM in response to 750 H2C

    One interesting observation I've made is that whenever I perform this Text Edit remedy (works every time), I find that I have to replace the string twice for each corrupt message. Maybe the corruption appears only when there's an earlier message included (as a reply thread) that is also coded the wrong way? This is a bit beyond me, but it might be interesting for you guys who know more about this.

  • by Bruce 55,

    Bruce 55 Bruce 55 Feb 3, 2015 2:47 AM in response to 750 H2C
    Level 1 (4 points)
    Feb 3, 2015 2:47 AM in response to 750 H2C

    I have the same issue where by removing the attachments all the mail content is replaced with gibberish type symbols. All was well with mail and has been for many years  unti I updated to Yosemite and then the problem did not become apparant for a few weeks. I have noted that it only occurs in a string of mails where there is more than 1 reply

     

    I have logged a bug  report with apple but may have to seek an alternative mail app. Does any one have a good suggestion for this?

  • by 750 H2C,

    750 H2C 750 H2C Feb 3, 2015 3:10 AM in response to Bruce 55
    Level 1 (15 points)
    Mac OS X
    Feb 3, 2015 3:10 AM in response to Bruce 55

    I had the same idea about using another email app until this has been solved. I scanned the market and settled with Postbox, which seemed to be competent enough for my needs. (Which might not be the same as yours, of course.)

     

    But as it turned out, Postbox seemed to suffer from a quick-fix update to meet Yosemite standards. At least to my eye. Mostly GUI issues, but since my impression of any app is closely related to its GUI appearance, I decided not to proceed with it. In addition, its function for importing mailboxes from Apple Mail was a bit shaky.

     

    So I'll personally stick with Apple Mail for a while longer, although the issue discussed in this thread (which is now manageable) is not my only problem with the app.

  • by 750 H2C,

    750 H2C 750 H2C Feb 3, 2015 3:35 AM in response to 750 H2C
    Level 1 (15 points)
    Mac OS X
    Feb 3, 2015 3:35 AM in response to 750 H2C

    I'd also like to add that the Finder preview of the message file in Finder might be OK even with the erratic coding. I've had both kinds of files: ones where the Finder displays the gibberish characters and ones where the message looks OK. But they can all be fixed by this quick string replacement via Text Edit or similar.

     

    Of course, the fastest way to find the message in Finder is to search for any files containing the message's subject line. So, this is my entire procedure:

    1. Copy the subject line of the corrupt message.
    2. Move the corrupt message to a local mailbox (on your computer).
    3. Quit Mail.
    4. Locate the message in Finder by pasting the copied subject line into Spotlight. It should be somewhere under ~Library/Mail/V2/Mailboxes/(the local mailbox to which you moved the message)… Note that the message preview in Finder might be OK.
    5. Open the message in Text Edit.
    6. Change "Content-Transfer-Encoding: base64" to "Content-Transfer-Encoding: 8bit" anytime it appears. For me it's always twice (at least), which corresponds to Bruce 55's experience that it's always a message with a thread of replies included.
    7. Save.
    8. Open up Mail again. Your message should now be de-corrupt.

     

    This seems to work for me every time.

first Previous Page 3 of 8 last Next