About deleting attachments

Asked by Peter Grandi

Is there is a built-in easy way to delete (binary) attachments from a stored message?

The reason: I often get "spam", with potentially dangerous and/or large attachments, and I would like to archive it, for periodic training of the bayesian "spam" detector I use, but I would like to remove them from the message. Ideally there would be a command that takes a regular expression of MIME types and another of file names of attachments to delete from a stored message.

Question information

English Edit question
VM Edit question
Uday Reddy Edit question
Solved by:
Uday Reddy
Last query:
Last reply:
Revision history for this message
Launchpad Janitor (janitor) said :

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
Uday Reddy (reddyuday) said :

Looking into it.

Revision history for this message
Uday Reddy (reddyuday) said :

The doc string for `vm-delete-all-attachments':

vm-delete-all-attachments is an interactive autoloaded compiled Lisp
function in `vm-mime.el'.

It is bound to C-c C-d.

(vm-delete-all-attachments &optional COUNT)

Delete all attachments from the next COUNT messages or marked
messages. For the purpose of this function, an "attachment" is
a mime part part which has "attachment" as its disposition or
simply has an associated filename. Any mime types that match
`vm-mime-deleteable-types' but not `vm-mime-deleteable-type-exceptions'
are also included.

Revision history for this message
Best Uday Reddy (reddyuday) said :

To do this for a whole buffer, you can try M-0 prefix command (if it works in your version), or mark all messages (`vm-mark-summay-region') and then use M-n.

Revision history for this message
Peter Grandi (pg-8) said :

Thanks Uday Reddy, that solved my question.