Gnus Sounds Like News
I literally just got the joke of the name while writing this entry. Sometimes I'm a little late to the party.
Anyways, Gnus is one of the many email and news readers available in Emacs. While others are reputed to be much more sane, straightforward, and easy to configure, I've been planning to switch from Mutt to Gnus for many years now. Some of the people whose opinions I respect espouse Gnus, so I'm going to try to live with it. Fingers crossed!
The first and most obvious thing that we want to do with a newsreader is define my identity. While I have a few identities I'd like to use with Gnus, my primary one is:
(setq user-mail-address "mak@kolybabi.com" user-full-name "Mak Kolybabi")
And with that, I realize that this is the first time I've named myself. Hi, I'm Mak! I like long walks and configurable systems. Next we need to tell the system how to send email.
(setq send-mail-function 'smtpmail-send-it smtpmail-smtp-server "mail.kolybabi.com" smtpmail-stream-type 'starttls smtpmail-smtp-service 587)
Now that we can send email, it is critical for me to not be able to easily send mail accidentally. I'm the kind of person that has his IRSSI (IRC client) configured to require I hold M-Enter
to send, for safety. Let's require a confirmation before sending an email:
(setq message-confirm-send t)
We can test sending an email with C-x m
, which opens a buffer populated with the fields of an email. Once that test has confirmed that I can send email, I'll configure the reading of email.
(setq gnus-select-method '(nnimap "kolybabi" (nnimap-address "mail.kolybabi.com") (nnimap-server-port "imaps") (nnimap-stream ssl) (nnmail-expiry-target "nnimap+kolybabi:trash") (nnmail-expiry-wait immediate)))
The credentials to log into SMTP and IMAP are stored in a separate file, ~/.authinfo
, and look like this:
machine mail.kolybabi.com login mak.kolybabi password hunter2 port imaps machine mail.kolybabi.com login mak.kolybabi password hunter2 port 587
Don't fret, my password isn't really hunter2.
In retrospect, that wasn't much to configure at all. I'm sure there will be much more tweaking later, especially since I'd like to add certificate pinning for my mail server for additional protection, and move my credentials into ~/.authinfo.gpg
. But for now, this setup is functional, even if it's not yet comfortable.