emailing with gnus - imap, smtp, gmail, etc
Contents
You don't need any configuration to use Gnus. Just emacs -f gnus
then type B
, you'll be prompted to enter all the information ephemerally:
- use
nnimap
as "methd" imap.gmail.com
as server (Gmail needs to be prepared to enable IMAP though)- type username and password
Gnus Basic Concepts
Gnus support newsgroup (NNTP), email (IMAP/POP), sending mail (IMAP). These are called "servers". Each server has many groups. For email servers, groups are just mail folders.
Groups Buffer
When Gnus starts up, you see the list of groups that you subscribed (which will be empty). This is called the group buffer. In group buffer, you can:
- Press
^
for the servers list, where you can enter each server and subscribe their groups (pressingu
)- Subscribe means if there're new items then they'll show in group buffer
- Press
g
to manually fetch - Press
m
for composing new message- This is different from
c-x m
sending mail, which has nothing to do with Gnus. The difference is Gnus can "gcc" the sent item into a specified Sent (archive) folder.
- This is different from
Summary Buffer
Entering each subscribed group, you'll see the articles, or posts, or messages. This is called the summary buffer. Here most commands are prefixed with B
:
B <DEL>
to purged
to mark as read (Gnus has many type of read marks but they don't matter for beginners)
Draft Buffer
In the draft buffer, press e
to edit (entering composing buffer)
Composing Buffer
This is where new messages (m
) or drafts (e
) are edited. In this view:
c-c c-c
to send- If not configured,
smtpmail
prompts you on how to send - this is not part of Gnus
- If not configured,
c-x k
to drop messagec-x c-s
to save messagec-c y
to yank original message when replying
Setting up Gmail IMAP with GNUS
Gmail makes it really hard to use IMAP:
- Turn on IMAP access in gmail settings
- Turn on "Less secure app access" - (NOTE DO NOT do this by switching account if your gmail is multi-accounts and it's not your primary - it will turn on "less secure" for the main account. Do this in incognito mode.)
- Now in GNUS (or any other client), use
imap.gmail.com
as server, and full gmail address as user name, regular password as password.
Setting up SDF SMTP
SDF SMTP's CRAM-MD5 auth is broken, even though it advertises that it's supported, it always fail client authentication when this method is used. This breaks Emacs smtpmail - which although supports other auth methods (plain, login), are not attempted when cram-md5 fails (which seems to be a bug). So to work around, I had to manually disable cram-md5 when SDF SMTP is used:
1 | (setq smtpmail-smtp-server "mx.sdf.org") |