Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

In Mountain Lion’s Mail app, I can delete attachments from mails others have sent me, but not from the mails I sent to others.

In the mailbox, the messages I have sent are not marked with the small paperclip, even when then have a attachments (however, their size is correct and includes the big attachments). When I select an individual message (or many), the "Delete attachements" menu item is grayed out.

How can I deleted attachments from mails I sent?

share|improve this question
    
What do you mean? If the mail was sent, the attachment has already been delivered. So there's no point in deleting it... But maybe I just didn't understand the question –  Abramodj Nov 8 '12 at 16:52
    
@Abramodj when an email is stored in your inbox, you can suppress its attachments (it's in the Message menu) from your local copy… this helps keeping the size of mail archives down to something reasonable –  F'x Nov 8 '12 at 17:00
add comment

2 Answers 2

up vote 2 down vote accepted

Based on the page http://lifehacker.com/5841097/how-to-delete-or-archive-attachments-in-apple-mail-and-free-up-disk-space I used the steps bellow.

** Method recommended only for those who feel comfortable using the Terminal **

  • open the terminal app (Applications > Utilities > Terminal)
  • change to the directory/folder with the emails typing in the terminal window

    $ cd ~/Library/Mail/V2
    
  • list the folders you have

    $ ls
    

    or

    $ ls -1
    
  • you will obtain something like:

    $ ls -1
    IMAP-info@furia.com.br@pop.furia.com.br
    IMAP-infofuria@imap.gmail.com
    MailData
    Mailboxes
    
  • go to the folder of the account you want to clean, list the files and the result shows one or more mbox

    $ cd IMAP-info@furia.com.br@pop.furia.com.br
    $ ls -1
    INBOX.mbox
    

    or

    $ ls -1
    INBOX.mbox
    INBOX0.mbox
    INBOX1014.mbox
    
  • if you have only one mbox, go to this folder, list it and you will see

    $ cd INBOX.mbox
    $ ls
    CE7AE9-C83C-410A-9406-4DEFB7034
    Archive.mbox
    Deleted Messages.mbox
    Drafts.mbox
    Info.plist
    Junk.mbox
    Sent Messages.mbox
    Trash.mbox
    
  • change to the folder of the messages sent (note the backslash before the space) and list to see the files

    $ cd Sent\ Messages.mbox
    $ ls 
    CE7AE9-C83C-410A-9406-4DEFB7034
    Info.plist
    
  • the first file is a folder and contains all the messages and attachments in a series of subfolders. Now you will use the powerful unix find command to find all the files to be deleted and delete them.

  • the find command can recursively descends the directory tree to search files by name and by size (among other options), so if you know that the attachmentes to be deleted are PDF files with more than 200k you can use the first command to find and list the files. Then if it's ok, delete them with the second command. The second example will find and delete zip files with more than 1 MB.

    $ find . -iname "*.pdf" -size +200k
    ./77CE7AE9-C83C-410A-94/Data/Attachments/303/2/abc.pdf
    ./77CE7AE9-C83C-410A-94/Data/Attachments/305/2/xyz.pdf
    $ find . -iname "*.pdf" -size +200k -delete
    $ find . -iname "*.zip" -size +1M -delete
    
  • and if you want to delete all attachments bellow the present folder, you can use one simple command. To confirm that you are at the correct folder verify first printing the working directory. Then, remove every Attachments folders bellow it.

    $ pwd
    /Users/user/Library/Mail/v2/IMAP-info@furia.com.br@pop.furia.com.br/INBOX.mbox/Sent Messages.mbox
    $ find . -iname Attachments -exec rm -R {} +
    
  • repeat these operations on all mbox of the account

share|improve this answer
add comment

This problem continues for some users (including me) in OS X 10.9.1 Mavericks with Mail.app v7.1 (1827).

Here's one work-around I found that worked for me, originally posted in an Apple Discussions thread. It may or may not work for everyone but it's safe and trivially easy to try. (A message with a "correctly recognized" attachment it generally one received from any outside source, as opposed to those in the Sent folder.)

Apple Discussions Thread Screenshot

Here's another work-around that I have not yet tried, but that may work for you: Apple Discussions thread:

Apple Discussions Thread #2

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.