7 Replies Latest reply: Aug 6, 2013 8:42 AM by Pimpa_dev
christian222 Level 1 Level 1 (0 points)

I believe that I have stumbled upon a bug in Mountain Lion mail.  Here is the set up:

 

Server:

Mac OS X Mountain Lion Server 10.8.2 running IMAP email service

 

Clients:

An assortment of Macs all running Mac OS X Mountain Lion 10.8.2 using Mail as the mail client over IMAP.

 

Issue:

Ever since upgrading all company Macs to Mountain Lion we have recieved complaints from people that email attachments are occationaly becoming currupted once moved to other mailboxes such as the Trash or even other IMAP folders.  The symptom has not been observed to occur with other mail services such as gMail or iCloud but rather seems to be isolated to how Mountain Lion Mail handles moved emails with attachments on an IMAP service hosted on Mountain Lion server.  The issue also seems to be related to PDF attachments only.  We could not get the issue to reoccur with say a Pages document.  The issue also does not always occur but occurs about 90% of the time. 

 

The email essentially goes from looking normal in the inbox to containing this text in it after it has been moved to another mailbox (obviously the real thing is like a hundred pages long):

--Apple-Mail=_6C0E1272-08D2-7895-83FF-2F03EF82B31D

Content-Disposition: inline;

          filename="example.pdf"

Content-Type: application/pdf;

          x-unix-mode=0644;

          name="example.pdf"

Content-Transfer-Encoding: base64


JVBERi0xLjMKJcTl8uXrp/Og0MTGCjQgMCBvYmoKPDwgL0xlbmd0aCA1IDAgUiAvRmlsdGVyIC9G

bGF0ZURlY29kZSA+PgpzdHJlYW0KeAF1UttOwzAMfc9XnMcEaWmctkkr8cJlEncVCEjcHtAYEgjY

mOCBv8dJ13YMUFXFso+P7WO/4xTvyJrpYjKdf3zev2DxxA5nKhj+bNW+k1dk+6+E3Rnjc4QFtgMo

Ikx8qIT1uQiMCoE0OxAecQPZKIwslTq

 

Now if that same email, now moved into a new mailbox, apearing corupted to the Mac Mail client, is viewed from say an iPhone or iPad, the attachment appears normal.  If a new Mac client is set up to read that email account that email also appears normal.  This would indicate that issue does not seem to be occuring server side but however seems related to a cashe issue with the Mail client. 

 

Temporary Fix:

Now this is not a good fix but deleting the entire /User/Library/Mail folder and forcing Mail to completely reconnect to the IMAP server and redownload all headers and attachements fixes the issue.  However this only fixes the emails that once appeard corrupted to the client.  Any new emails moved around will continue to get corupted.  Syncronizing the mailbox does nothing to rectify the issue.

 

Plee for help:

Obviosuly this is a serious issue and must be rectified.  We are using the most standard and Mac friendly/default set up possible (even a Mac server).  Has anyone expereinced this issue or want to venture a guess on how to fix it?  Does it seem like a bug in the Mail client to you?  Any ideas???

 

I really apprecaite the help.

 

-Christian


MacBook Pro with Retina display, OS X Mountain Lion (10.8.2)
  • 1. Re: Email Attachments Become Corrupted When Moved to a Different Mailbox
    ragush Level 1 Level 1 (30 points)

    Click on Mailbox--> Rebuild.  That worked for me.

  • 2. Re: Email Attachments Become Corrupted When Moved to a Different Mailbox
    christian222 Level 1 Level 1 (0 points)

    Okay so while this does fix the email attachments appearing to be corrupted, it is not a permanent fix as invariably the issue continues with new moved emails?  Anyone have a real fix to this? 

     

    Thanks

  • 3. Re: Email Attachments Become Corrupted When Moved to a Different Mailbox
    StevePW Level 1 Level 1 (5 points)

    I'm seeing some clients with this issue too. Initially I thought it was server side spam filtering or blacklisting but these are now off.

     

    Please respond in this thread if you come across a solution (other than constantly rebuilding mailboxes)!

     

    Steve

  • 4. Re: Email Attachments Become Corrupted When Moved to a Different Mailbox
    Pimpa_dev Level 1 Level 1 (0 points)

    Unfortunatelly I don't have a permanent solution either...

     

    Sadly this problem is exists since ages. (https://discussions.apple.com/thread/2691417?start=0&tstart=0 from Dec 2010) It affects mail with any attachment not just pdfs.

     

    Previously I figured out if the IMAP server uses dovecot vesrion >2.0 the mail corruption will happen when you move a mail from one folder to other on the same server. I never used OSX Server but I think it uses dovecot as IMAP server as well. The strange thing is that on earlier versions of dovecot this corruption did not happen, but It looks like it's not the server's fault because in that case "rebuild" mailbox shouldn't work either so the mail is moved correctly to the other folder on the server while the headers cut in Mail. Sadly the only solution when this happens is to rebuild...

     

    Now I'm testing 10.9 and the same happens so in Mail 7.0 so it's still not fixed.

     

    Please file a bugreport at apple's support pages maybe not all of them ends in "/dev/null"

     

    I will file my bug report again too!!!

     

    Hope apple will fix this...

  • 5. Re: Email Attachments Become Corrupted When Moved to a Different Mailbox
    andymaw Level 1 Level 1 (0 points)

    Exactly the same here, been on the phone to Apple support endlessly. We thought we'd fixed it at one point but the problem seems to have come back now. On hold at the moment, will report back if they have any ideas.

     

    Definitely seems to be something to do with the email being moved to a different IMAP folder.

  • 6. Re: Email Attachments Become Corrupted When Moved to a Different Mailbox
    andymaw Level 1 Level 1 (0 points)

    They escalated the problem and just got back to me. Apparently it's a known issue and has been since Tiger. They can't pinpoint exactly what causes it. It could be the amount of emails in the folder, and could get worse the more emails you have in there. There's some issue syncing.

     

    The only suggestion I got was to create a seperate mailbox, move the email with the messed up attachment into it, rebuild that mailbox, then move it back... which is what I've been doing anyway, and I suppose saves rebuilding the entire mailbox. Not good though.

     

    I'm going to try using Postbox, see if that's any better.

  • 7. Re: Email Attachments Become Corrupted When Moved to a Different Mailbox
    Pimpa_dev Level 1 Level 1 (0 points)

    Oh man! So they say "We know this is a bug and we can't fix it since Tiger" ????? This is Apple with an army of developers and they can't fix this annoying issue???? WHAT???? I think this is a not a day more problem to fix and their professional OS X Server is affected by this problem as well and they don't fix it... their own software... what a customer care!!!

     

    Anyway it sounds ******** and the solution is the same category... if you have only one mail in the mailbox and move to an other on a certain type of server it's getting corrupted, but the rebuild process works and when you move back it will be corrupted again! They should fix this but it looks like they will never fix it... it's a shame from a big company which sells premium products.

     

    So if you still in contact with an Apple technician and they're opened I can provide both of the server platform when the problem can be proofed. (one where the sync is ok and one where it isn't and only with one mail in it ) Please contact me and I can help!

     

    You can try other mail softwares and they can handle the imap protocol without major problems. I tried the following ones:

     

    - Postbox

    - Thunderbird

    - Sparrow

    - Mail Mate

     

    Both works very wall but any of them is so integrated as the mail app with osx. Unfortunately if you live in the apple ecosystem and own more than one mac computer you will stuck with the apple one with all of its bugs.

     

    ...since Tiger... I can't get over it...

     

    Sorry guys I getting angry when I hear this kind of stories...