I Transitioned Local E-mail Management to Gnus

I have been mostly using E-mail on Gmail interface, as I use Gmail and Google Apps (or, I guess they changed their enterprise offering to Google Apps for Work…) I have been using Mozilla Thunderbird once in a while. In normal circumstance, it would have been OK, but here are some issue of bit slow for the load.

Basically my requirements were:

  1. I literally receive a few hundred of E-mail a day and it needs to be able to handle that. Not that I have to read over every single E-mail with details, but there are a handful of mailing list articles I’d like to triage.
  2. Being able to author and send text E-mail (more on it later)
  3. I use Mac and Linux, and cross platform is a must. (This is one of reasons, in addition to bitter experience in the past that I would never use Microsoft Outlook — in case someone would suggest this — and it’s not great at handling #1 point above.)
  4. Support OpenPGP
  5. It must be able to support multiple account (Home and Work)

So this left me with few choices. Pretty much even 3rd point would disqualify a lot of choices to begin with. Then I just thought, Emacs already has built-in mailer, and considering every platform I ever have to interact would have it already installed, mainly because I use it daily.

So this is how I landed on Gnus.

In the case of myself, the following was an advantage I have found of this set up:

  • It pretty much fulfills my requirements.
  • As far as authoring text E-mail, it’s one of the most powerful softwares you can find out there. After all, it’s a text editor.
  • Gives me full control, won’t try to hide things from me.
  • It’s relatively easy for me to service it myself to modify or extend its parameter and functionality, knowing some Emacs Lisp.
  • Works with Org-mode. (See here.)

Things I purposely didn’t consider are:

  • Search facility — I felt it’s better to leave it up to Gmail interface, considering how fast it can search. Beside some automatic tagging, pretty much my E-mail is managed chronologically, and searching for E-mail more than I can glance over would require some serious deep searching. I have determined that after E-mail gets old enough to past certain point, it would be too old to be useful, and never get touched. Although, I still keep a copy of it, they are pretty much dormant, so I tend to leave the structure flat.
  • Notification — The age of smartphone (and I even have smartwatch) made it quite unnecessary for me to receive notification from my mailer. Although I can have Gnus pull E-mail and notify of new E-mail arrival, I purposely didn’t configure it.
  • Richtext authoring — I do not need fancy HTML/Rich text authoring. If you know me, I don’t purposely send out E-mail with mark ups. I’d rather stick with plain text and occasional use of simplified markdown. (Only time you’d see any formatted E-mail is coming from me is when I send the message out from my phone — because Gmail for Android sends the message out that way. I don’t know the reasoning behind the use of formatted E-mail as opposed to plain text considering you can’t really take advantage of rich formatting on that app.) Occasionally some ill-behaving (and possibly misconfigured) mailer sends me E-mail without alternative MIME part for text. In this case, I’d just read that portion of E-mail on the browser. (K-H command works very well to make this happen.) By the way, if you send mail this way, your E-mail will be ignored and/or will be sent to the very end of my queue.

So if you care about those points, my experience wouldn’t be too useful to begin with, so you can stop reading here.

Considering I have multiple Gmail/Google Apps account, I had to have something that manages multiple SMTP address.
I used using ‘gnus’ to read mail article from the emacs 30 Day Challenge useful to configure this. What I did not do was fully automated the process of choosing SMTP server, as there are fairly complex set of E-mail aliasing I have to take care, so I left some manual control to configuring this information by myself when sending E-mail, specifically by configuring X-Message-SMTP-Method and From fields. The code from the site is still incorporated, to validate that only valid E-mail addresses are ever specified in such configuration. This is primarily done by the code like below:

(defun gnus-set-mail ()
  (interactive)
  (message-goto-from)
  (kill-whole-line)
  (insert "X-Message-SMTP-Method: smtp smtp.googlemail.com 587 example@gmail.com.com\nFrom: Example \n\n")
  (message-goto-body)
  )

Further, I’ve replaced the default key map for toggling thread view (gnus-summary-toggle-threads initially defined as C-M-t to C-c C-t simply because I use C-M-t for opening a console on my Linux machines. (I currently use KDE, but I find this shortcut like Unity useful.) Configuring this is actually easy, by the way:

(define-key gnus-summary-mode-map "\C-c\C-t" 'gnus-summary-toggle-threads)

Gnus contains powerful E-mail authoring feature called MML, which basically allows me to mark up MIME structure. This would allow me, for example, to insert arbitrary MIME parts into E-mail. While I don’t do so much of this, nonetheless, this would allow me to fine tune the way attachments are configured, for example.

Defining MIME parts, each with different character set.
Defining MIME parts, each with different character set.

Smooth sailing so far, but I like to improve few of process to fit my needs, which I will be exploring as they becomes necessary!