Mail.app and it’s Offline Cache

I had an issue recently where I started to send an email with a HUGE attachment, before realising I didn’t really need to send that file, so I tried to cancel it. Try as I might, I just couldn’t get rid of it.
In desperation, I went into the ~/Library/Mail folder and started deleting things that looked like they might be an Outbox, or a temporary storage location. I rebooted. I deleted some of the .impabox folder caches. I went into webmail for the account and deleted saved drafts. Every time I relaunched Mail, it would immediately start uploading this phantom mail message. Even leaving it to go for half an hour or more didn’t result in it completing the task.

Eventually lsof came to the rescue.

Using this, I was able to determine that there was a hidden folder with the cached mail message in it that Mail kept trying to upload.

Once I deleted the following folder, everything was then OK;

/Users/kai/Library/Mail/[email protected]@imap.example.com/.OfflineCache/1

Note the pesky “.” at the start of the OfflineCache folder name – this means it was hidden from view in the Finder.

This article was posted by Kai Howells. If you liked this content and have any technical work in the Melbourne area, say hello via my contact form or give me a call on 0419 361 653 - I cover most of the greater Melbourne area and my rates are competitive.

One Response to Mail.app and it’s Offline Cache

  1. Pingback: Silently broken Gmail | joe crobak's website

Leave a Reply

Your email address will not be published. Required fields are marked *