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
New insight: I see now what Apple does wrong in its "Remove Attachments" command.
When they find a base64-encoded text/html portion in the original message they – for some reason – decide to decode it first. Then, after removing the attachment from the source, they write the decoded text version into the new message but leave the encoding headers intact, ie "Content-Transfer-Encoding: base64".
I verified this by comparing original messages with those created after attachment removals that went berzerk. I haven't been able to verify if this is true for all base64 text/html messages with attachments however. Has any found any deviations from this?
Suggested solution (to Apple): Stop decoding any base64 parts of the original message. Just leave them as they are, and write them back into the new message with their original headers.
Posted on Feb 9, 2015 7:21 AM