Evolution mail client

Extracting in-line images

The Evolution devs know better than you how you want to manage your mail. Consequently, if someone sends mail with an inline image you can not easily save that image like you can with other email clients. Also you cannot remove the image before archiving your mail. The best Evolution provides for forwarding images is to forward the entire email as an atachment which you cannot edit before sending.

Inline images are, as the word inline suggests, sent "inline" with the message body as base64 encoded text. Once that text is extracted it can be rendered as an actual image using the base64 utility.

Evolution saves all mail in one file so if you have 3000 messages in your inbox it could be a pain to find the one you're interested in. The file is displayed in Evolution as a folder but it is really an ASCII text file.

One solution is to forward the message to yourself and retrieve it with some other mail client, or you can do what I do:

  1. Right click the message in the message list
  2. Select "Copy to Folder..."
  3. Click "New"
  4. Select "On this Computer" and type a folder name. i.e. saver
  5. Click "Create"
  6. Click "Copy"
  7. You will see a new "folder" appear in the list under "On this Computer" named saver
  8. Check to verify that the "folder" contains the mail message of interest
  9. With a file browser or from the command line copy the file "~/.evolution/mail/local/saver" to some working directory outside of the .evolution branch such as /tmp
  10. Back in Evolution, delete the "saver" folder
  11. Start your favorite text editor either on the desktop or in a virtual terminal and open /tmp/saver
  12. Scroll down until you find some lines like:
    Content-Type: image/jpeg; name="image11.jpg"
    Content-Transfer-Encoding: base64
    Content-ID: <2F76DDA5EB2D4ED3AC9929F8BEB5E1AD@amd>
    (note the image type)
  13. What follows is the base64 encoding of the image, so select just the encoded lines and save the selection as a text file i.e. /tmp/image.txt
  14. From a terminal, cd /tmp; base64 -d image.txt > img.jpg
  15. Now view the image: feh /tmp/img.jpg
  16. If it's what you expected, move it to wherever you want it

If you have a simple mail message with only one image you can replace steps 11 through 14 with

cat /tmp/saver | sed '1,/^Content-ID/d' | sed '/=/q' | base64 -d > /tmp/img.jpg

Here's another way I recently discovered. With the message selected, click forward as -> inline. When the new mail is displayed, right click on the atachment and pick an editor. I used emacs. Scroll down in the editor window until you find the base64 code as outlined above. This is an easier and quicker way to copy and paste the base64 code.

Getting rid of the trash

The Evolution devs also know better than you that you should never throw away any email; at least that's the way things are, as you well know if you've ever tried to get rid of the trash in evolution.

When I googled "evolution empty trash" I got 1,370 hits, so it's not just me.

At this link is a workaround.

Just to be on the safe side, I copied the entire ~/.evolution directory to another location.

cp -a ~/.evolution ~/.evsaver

What I found was that the Junk.cmeta and Trash.cmeta files were not in ~/.evolution/mail/local as stated is some of the solutions, but instead it was in ~/.evolution/mail/local/.#evolution.sbd/ and I deleted the entire folder.

rm -rfv ~/.evolution/mail/local/.#evolution.sbd/

I also followed the advice in the link above and deleted those files:

cd ~/.evolution/mail/local/
rm -fv *.index *.ev-summary *.cmeta

Then I restarted evolution and tried right clicking on trash and selecting empty trash which did not work. For what it's worth, I had previously un-selected View/Hide Deleted Messages. However by selecting each folder in turn and selecting Folder/Expunge I was able to get rid of the trash.

NOTE: If you don't "Expunge", evolution retains every message you ever sent or received since you began using it. There were far more messages that what was in the visible folders prior to the expunge.


Send mail to the Webmaster

logo This site best viewed with a browser
Warning: This is a Debian centric site and MAY contain peanuts.
Many thanks to Debra Lynn and Ian Murdock for making Debian possible
First created Mar 21 2011 ~ Last revised January 17, 2012

Valid XHTML 1.0 Strict Valid CSS!