Re: [Evolution] Deleting attachments



On Tue, 12 Sep 2006 15:00:33 -0400
Andrew Duane <andrew savaje com> wrote:

Is there a way to remove attachments from a message? I often get BIG
attachments on small messages that I need to keep (for instructions,
etc). But I'd like to not keep the 10MB of attachments there too,
after I've saved them.

Hi Andrew
Each mail directory in evolution is a separate file in mbox format.

If you copy the main file (the one with the folder name only) to a
temporary directory, then run 

delatt --mbox --save <attachments folder> <mailboxname>

(see http://danborn.net/delatt for a tarball with the delatt binary
and the command syntax):
<snip from dan's web page>
Description

delatt: Delete attachments. delatt strips attachments from email, and
can optionally save the attachments to files. It will work with either
mbox or maildir files.

It's great for archiving old email without wasting space on attachments
and the extra HTML message parts that some MUAs attach.
Usage

Usage: delatt --mbox|--mdir [--save <directory>] [<files>]

--mbox if the given files are mbox mail folders.

--mdir if the given files are maildir messages.

--save if you want the stripped attachments to be saved to files in the
named <directory>. If a filename for an attachment is not specified in
the message then it will be named attachment_year-month-day. If
multiple files have the same name, they will have .<number> appended to
their names. If the attachment is MIME base64 encoded, it will be
decoded into the file. If it's some other encoding type, it will be
written as-is. HTML "alternative" message parts are deleted. (Many
clients, like Outlook, have the annoying habit of sending a text
message with an HTML copy of the same message attached.)

<files> to specify the maildir message files or mbox folder files to
process. If no files are specified on the command line, then either a
maildir message or an mbox folder (depending on --mdir or --mbox) is
read from standard input and the output is sent to standard output.

Download tarball:

http://danborn.net/delatt/delatt-1.1.3.tar.gz 

</snip from Dan's web page>

the attachments will be stripped out and the mailbox folder left with
just the emails. Copy this (now smaller) file back again and no
attachment bloat.
Caveat: I have no idea what side effects this might have!

Use at your own risk, only work in a temporary folder and if
appropriate copy into a temporary working folder in the Evolution
tree before overwriting the main file.

regards

Martin



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]