Matt McCutchen's Web SiteMy email solution  (Top, Background, Goals, Notes, Accounts, Inbox and All Mail, Labeling incoming messages, Threading, Drafts, Sent mail, GPG signing, GPG encryption, Modified Evolution RPMs, End result, Changelog, Bottom).  Email me about this page.

My email solution

Status: partly obsolete; 2007-2008 (supersedes any conflicting remarks left on this page; see the home page for definitions)

Status as of 2020-09-02: I still use Evolution and handle accounts, labeling, threading, archiving, and drafts in essentially the way described below, except that my email triage discipline is very poor (consequently, it's hard to find messages that need action in the "Inbox" search folder) and I only get around to archiving once every few years.  At some point I decided to stop using Gmail for most of my mail to reduce my exposure to Google: I switched matt@mattmccutchen.net to stay on the DreamHost web server rather than forwarding to Gmail and removed the automatic bcc to Gmail.  When I get to it, I want to migrate from Evolution to a mail client with lower attack surface; I haven't looked recently for options that might let me maintain a similar workflow.  The software packages here are obsolete; as far as I recall, all of my fixes made it into upstream Evolution.

Background[Top]

When I entered Montgomery Blair High School in fall 2003, for the first time I had two email accounts: a personal one and a school one.  I made a point of keeping them separate: school-related mail on the school account and everything else on the personal account.  (This probably arose from my very strict reading of the school's acceptable use policy: I wanted to be able to check school-related mail at school without potentially being distracted by personal mail.  Equally, I didn't want any possibility of the school intercepting and reading my personal mail.)  I had recently begun to migrate from Windows to Linux and needed to move my email archive (about 80 messages) from Microsoft Outlook Express to my Linux mail software of choice, Evolution.  KMail knew how to read the proprietary Outlook Express format, so I had it import the mail into maildirs and then imported each message individually into Evolution using its import wizard.  (Ouch!  I should have known to "cat" the messages together into an mbox and import that in one fell swoop; I have learned so much since then!)  I used Evolution to read and send mail on my two accounts, using POP for the personal account and IMAP for the school one; when I was finished with a school message, I archived it on my own computer.  So far so good.

On March 22, 2006, a foolish Verizon anti-spam policy interfered with my correspondence with Paul Slootman on the rsync mailing list.  Having heard good things about Gmail from a friend, I decided to switch to it for my personal email.  My conversion was gradual.  At first I just used Gmail as a better vehicle for receiving mail and continued to read my mail in Evolution.  In June 2006, at the Research Science Institute and denied access to the Internet from my own computer, I began to read mail primarily in the Gmail Web interface.  I grew more and more loyal to its superior model for managing mail.  On August 22, 2006, I finally "subordinated" my school account to my Gmail account by having it forward mail to Gmail and using Gmail to send mail "from" it using the custom From address feature.  Still, I was careful to reply to each message from the appropriate address (personal or school) using Gmail's custom From address feature.  I later gained additional email accounts from the University of Maryland and my new domain, mattmccutchen.net, but the essential model remained the same: everything forwarded to Gmail, and I responded to everything from there using custom From addresses.  So far so good.

On October 18, 2007, a serious hole appeared in the system.  My University of Maryland email address forwards to my "backend" email address on record with UMD, which was then my Gmail address.  Some University of Maryland organizations evidently reached through the level of abstraction and subscribed me to mailing lists via my Gmail address, which irritated me because it interfered with my segregation of identities.  To prevent that from happening again, I introduced another level of indirection by having my mail forwarded through the Mail@UMD system.  I still wanted to move my existing list subscriptions to my UMD address.  But when I attempted to make the new subscriptions by emailing the LISTSERV system from my Gmail custom From address for UMD, LISTSERV noticed the Sender header indicating that the messages were really from my Gmail account and subscribed me there instead!  With Evolution, I had been able to send real email from all my accounts via their own SMTP servers, but Gmail was such a great solution that I tolerated the uncleanliness of custom From addresses; then the incident with LISTSERV tipped the balance back the other way.  Furthermore, I had become interested in encrypting my mail, which Evolution could do but Gmail didn't help me with (and I wouldn't trust Gmail with my keys anyway).

Thus, I decided to switch back to reading and sending my mail in Evolution and to put some effort into (1) configuring the Evolution interface to function similarly to Gmail and (2) making Evolution play nicely with continued occasional use of the Gmail Web interface for remote access to email.  This page documents my email setup for the benefit of Gmail users who might like to use something similar and users of other services who might want to make Evolution function more like Gmail.  If you are following the procedure and encounter any trouble, email me and I will be happy to help.

Goals[# Top]

Somewhat in summary, here are the goals I had in the setup:

And here's what I did to achieve them.

Notes[Top]

Accounts[Top]

All the non-Gmail accounts that I know I have are configured to forward to Gmail so I don't miss any mail, no matter at what obscure address someone might send it to me.  Evolution is configured to pop my Gmail, and Gmail is configured to archive messages when they are popped.  This is reasonable: when I am away from my computer, Gmail will show me messages I received since I left it.

The external accounts from which I actually send mail (currently three) are entered into Evolution as send-only using their real SMTP servers.  I also have some send-only accounts for plus-extensions of my Gmail address.

Inbox and All Mail[Top]

Evolution supports five colored labels, at most one of which can appear on each message.  Support for an unlimited number of labels and multiple per message is in the works.  Once it is added, I may use labels for topics, but for now, I just use them to represent mutually exclusive statuses that a message can have: "Inbox", "To Do", "Pending", etc.

I created search folders "All mail" and "Inbox" that match all mail and mail carrying the "Inbox" label, respectively.  To archive a message, I simply unlabel it using the context menu; instead of using the mouse, I can press the context menu key, L, space.  Often, I have to switch away from and back to the "Inbox" search folder (sometimes multiple times) to get it to update correctly.

Alternatively, I could add a filter to the top of my incoming chain that matches messages labeled "Inbox" and unlabels them and then stops processing.  This will never get triggered for incoming mail, and it lets me archive a message by running the Apply Filters command on it with the keyboard shortcut Ctrl+Y (amusingly similar to Gmail's "y").  At the moment I think this hack isn't worth the convenience, but I might change my mind.

Labeling incoming messages[Top]

I needed to make a filter that matches all incoming messages and labels them "Inbox"; unfortunately, the Evolution authors seem to have left out a filter action to label a message.

I looked at the Evolution source and learned that Evolution associates with each message a set of user tags, i.e., name/value string pairs.  For a folder .evolution/mail/local/Foo, user tags are stored among other stuff in .evolution/mail/local/Foo.ev-summary.  Labels are stored in a user tag named "label".  The five labels are stored as "important", "work", "personal", "todo", "later" regardless of what the user names them; see mail/mail-config.c:79 in the Evolution source.  In search of maximum power with minimum hacking, I added filter actions that set and unset user tags to Evolution and evolution-data-server.  Then I just made a filter with action "Set User Tag", "label", "important" ("important" indicates the first label, which I named Inbox).

Note: A "Set Label" filter action has been added to Evolution, so I am no longer using the custom-added filter actions.

If you find it useful, I think you can write filters that set your own custom user tags and then test them using the "Expression" filter condition.  The "Expression" is in a stripped-down version of Scheme; testing a user tag looks like (not (= (user-tag "mytagname") "myvalue")).

Threading[Top]

I enabled the threaded folder view (Ctrl+T).  In addition, if a thread contains at least one message labeled Inbox, I want all messages in the same thread to appear with it in the Inbox.  To achieve this, I just set "Include threads: all related" in the search folder configuration.

Unfortunately, Evolution seems to have the limitation that a matched message can only cause the inclusion of thread-related messages stored in the same mbox.  To prevent this from becoming a problem, I needed to guarantee that all the messages of each thread are in the same mbox.  I can't leave everything in the Inbox mbox forever because performance will become unacceptable.  Thus, each month, I will move all threads that have been dead for over a month into a separate folder.  To do this, I first move all the messages over and then use a search folder of messages sent in the past month with "Include threads: all related" to move recent threads back.  This way, no folder has more than about a month's worth of email, but threads are rarely split.  If a thread does come back to life after I have archived it, I find the missing messages in All Mail and move them back to the Inbox.

Drafts[Top]

I wanted all drafts to appear in the Inbox.  (This goes one step further than Gmail, which attaches drafts only to Inbox conversations.  Perhaps my Inbox should really be named "The radar" or something?  In Evolution, I can do that!)  I added a criterion to the Inbox search folder to match messages with Draft status.  [Note: A bug in evolution-data-server broke the test of Draft status; I am maintaining custom evolution-data-server packages with the bug fixed.  The fix is now upstream but as of 2008-07-10 has not reached Fedora.]

The Drafts folder also needed to be a source of the Inbox search folder, but "All local folders" didn't seem to include it.  I remember that an older version of Evolution said "With all local folders" and let me enter additional folders in the box; I speculate that the feature was removed because it confused users.  In any event, the functionality is still there if you edit your .evolution/mail/vfolders.xml by hand.  The sources block for each search folder should look like this:

<sources with="local">
  <folder uri="email://local@local/Drafts"/>
</sources>

Drafts look the same as other messages in the Inbox; it would be nice if they had a decoration, but I can't see an easy way to add one.  Of course, Evolution drafts don't synchronize with Gmail ones, but I rarely need that, and I can just copy and paste.

Sent mail[Top]

Every message I receive goes to Gmail, which stores one copy, and Evolution pops and stores a copy; nice and simple.  Making the same thing happen for sent mail is more subtle.

When I use Evolution to send a message through an external SMTP server, Gmail is not involved in the process, so it would ordinarily not store a copy of the message.  To give it a copy, I bcc myself at a plus extension of my Gmail address; I chose "+esi" for "external send import".  I configured the external Evolution accounts to "Always bcc to" this address.

Evolution will re-pop the message, leading to duplicates; to avoid that, I have a filter at the top of my chain that matches them, deletes them, and stops further processing.  The filter condition is "Regex Match", "Message Header", "Delivered-To: hashproduct\+esi@gmail.com" (I escaped the plus sign for the regex).  In addition, I added a filter to Gmail to make deposited externally sent messages "Skip the Inbox", though it isn't terribly important because they will get archived when Evolution re-pops them.  Since Gmail (alas) can't match Delivered-To, I made the filter match messages from any of my addresses, which is good enough.

The flip side: when I send a message through Gmail and then return to my computer, Gmail will offer it for popping like any incoming message.  I want Evolution to mark the message read and to not label it Inbox.  I added a filter that matches messages for which my Gmail address is either the From or (in case of custom From) the Sender and marks them read; I also modified the Inbox-labeling filter to require that my address appear in neither of those headers.  Here is a summary of my Evolution incoming filter chain:

To keep messages sent through Evolution from accumulating in the Sent folder, I added an outgoing filter that lumps them all into the Inbox where they are subject to monthly archival.

GPG signing[Top]

Following the University of Maryland Linux Users Group cryptography talk on 2008-04-02, I began to GPG-sign most of the email I send.  I enabled GPG signing for accounts listed on my GPG key on the "Security" tab of the account preferences.  Currently I am using a single GPG key for both matt@mattmccutchen.net and rmccutch@umd.edu, but it might be more appropriate to use separate keys for separate identities.

When I upgraded to Fedora 9, I hit a bug where Evolution forgets my mail server passwords every time the GPG passphrase dialog appears; the bug has since been fixed in the Fedora evolution-data-server.

GPG encryption[Top]

I sometimes encrypt outgoing mail if it is sensitive or I am just having fun.  Evolution tells GPG to encrypt to all addresses in the To, Cc, and Bcc fields, and GPG was choking on "hashproduct+esi@gmail.com"; to fix that, I defined a GPG group by that name containing only myself.  The alternative would be to add another user ID to my key, but I wouldn't want to export that user ID to key servers and I know of no easy way to exclude it.

When I send encrypted mail, Evolution stores it encrypted, and I have to enter my passphrase to read it.  For all but the most sensitive messages, I consider this a hassle rather than a valuable security layer, since I have gone to some pains to secure my computer as a whole.  I would like to be able store most sent messages so I can read them without entering my passphrase.  I could simply encrypt to an additional key with no passphrase, but that ciphertext would be sent over the network, so the subordinate key could become a point of vulnerability; I need to think this approach over more carefully before adopting it.

Modified Evolution RPMs[# Top]

Here are RPMs of my modified evolution-data-server that has the fix to testing Draft status.  These are based on the Fedora 9 packages of Evolution 2.22.3.  You can try installing the RPMs (most likely to work on recent Fedora) or extract my patch from the source RPMs and build/install Evolution yourself.  If you like, you can download the RPMs via the Yum repository:

[mattmccutchen]
name=Matt McCutchen's RPM repository
baseurl=http://mattmccutchen.net/rpm/
enabled=1
FileSizeModification time
evolution-data-server-2.22.3-2.fc9.matt1.src.rpm76569482008-08-14 20:00:55 +0000
evolution-data-server-2.22.3-2.fc9.matt1.i386.rpm40086762008-08-14 20:01:03 +0000
evolution-data-server-devel-2.22.3-2.fc9.matt1.i386.rpm2835972008-08-14 20:01:03 +0000
evolution-data-server-doc-2.22.3-2.fc9.matt1.i386.rpm5281052008-08-14 20:01:04 +0000
evolution-data-server-debuginfo-2.22.3-2.fc9.matt1.i386.rpm53831252008-08-14 20:01:18 +0000

End result[Top]

While at my computer, I monitor and respond to my mail with a comfortably configured Evolution interface; when away, I can use the Gmail Web interface.  Either way, I can send email from any account (Gmail can only do custom From, not real external SMTP, but that's tolerable) and the system ensures that one copy of each message ends up in each of Gmail and Evolution.  So far, I am very satisfied with this solution.

Changelog[Top]


Matt McCutchen's Web SiteMy email solution  (Top, Background, Goals, Notes, Accounts, Inbox and All Mail, Labeling incoming messages, Threading, Drafts, Sent mail, GPG signing, GPG encryption, Modified Evolution RPMs, End result, Changelog, Bottom).  Email me about this page.
Modification time of this page's main source file: 2022-07-09 18:51:52 +0000
Except where otherwise noted, Matt McCutchen waives his copyright to the content of this site.  This site comes with absolutely no warranty.  Why?