# Gnus

> Mail and news reader built into GNU Emacs, with back ends for IMAP, POP3, local mail folders and NNTP.

Gnus ships with GNU Emacs, so it needs no separate install once Emacs is present. It treats mail folders, IMAP mailboxes and Usenet newsgroups alike as groups, and can talk to IMAP directly or work on local Maildir, MH and mbox stores. Sending goes through Emacs message mode and smtpmail. It suits Emacs users who want one program for mail, newsgroups and feeds and are willing to learn its group and summary model.

- Type: Email client
- Interface: Runs inside Emacs
- Systems: Runs on Linux, macOS, Windows and BSD, on Android through Termux.
- Language: Emacs Lisp
- License: GPL 3.0 or later (GPL-3.0-or-later)
- Latest version: 5.13 (bundled with Emacs 31.1)
- Background: Rewrite of GNUS, the earlier Emacs newsreader; part of GNU Emacs
- Maintained: yes
- Website: https://www.gnus.org/
- Source: https://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/gnus
- Documentation: https://www.gnu.org/software/emacs/manual/gnus.html

## Install

### Linux

Native.

- apt: `sudo apt install emacs`
- dnf: `sudo dnf install emacs`
- pacman: `sudo pacman -S emacs`

### macOS

Native.

- Homebrew: `brew install emacs`
- Homebrew Cask: `brew install --cask emacs-app`

### Windows

Native. Gnus runs in native Windows builds of GNU Emacs.

- winget: `winget install GNU.Emacs`
- Scoop: `scoop bucket add extras && scoop install extras/emacs`

### BSD

Native.

- FreeBSD pkg: `pkg install emacs`
- OpenBSD: `pkg_add emacs`

### Android

Through Termux.

- Termux: `pkg install emacs`

## Protocols

- IMAP: Yes
- POP3: Yes
- SMTP: Yes
- JMAP: No
- Maildir: Yes
- mbox: Yes
- notmuch: Through a separate tool

## Features

- OpenPGP: Yes
- S/MIME: Yes
- OAuth2 sign-in: via plugin
- Threads: Yes
- Search: gnus-search: IMAP SEARCH, or notmuch, mu, mairix and other local indexers
- HTML mail: built-in, rendered with the Emacs shr library
- Mouse: Yes
- Multiple accounts: Yes
- Offline use: via the Gnus agent or local Maildir back ends
- Calendar: replies to invitations with gnus-icalendar
- Contacts: via BBDB or EUDC
- Vim-style keys: No
- Configuration: Emacs Lisp in init.el or ~/.gnus.el

## Pros

- Included with every GNU Emacs install, including native Windows builds.
- Reads IMAP directly, plus local Maildir, MH and mbox stores and NNTP newsgroups.
- Scoring, splitting and the Gnus agent allow detailed filtering and offline reading.

## Cons

- The group, summary and article model takes time to learn.
- IMAP access runs inside Emacs, so large mailboxes can make Emacs wait.
- Configuration is Emacs Lisp spread across many variables.

## Use Gnus with Forward Email

File: `~/.emacs.d/init.el`

```
;; ~/.emacs.d/init.el (or ~/.gnus.el)
(setq user-mail-address "you@example.com"
      user-full-name "Your Name"
      gnus-select-method
      '(nnimap "forwardemail"
               (nnimap-address "imap.forwardemail.net")
               (nnimap-server-port 993)
               (nnimap-stream tls)
               (nnimap-user "you@example.com"))
      gnus-message-archive-group "nnimap+forwardemail:Sent Mail"
      message-send-mail-function 'smtpmail-send-it
      smtpmail-smtp-server "smtp.forwardemail.net"
      smtpmail-smtp-service 465
      smtpmail-stream-type 'ssl
      smtpmail-smtp-user "you@example.com")

;; Passwords in ~/.authinfo.gpg (read by Emacs auth-source):
;; machine imap.forwardemail.net login you@example.com port 993 password YOUR-GENERATED-PASSWORD
;; machine smtp.forwardemail.net login you@example.com port 465 password YOUR-GENERATED-PASSWORD
;; Start with M-x gnus
```

| Protocol | Server | Port | Security |
| --- | --- | --- | --- |
| IMAP | imap.forwardemail.net | 993 | SSL/TLS |
| POP3 | pop3.forwardemail.net | 995 | SSL/TLS |
| SMTP | smtp.forwardemail.net | 465 | SSL/TLS |
| SMTP | smtp.forwardemail.net | 587 | STARTTLS |

Username: your full alias address. Password: the one from Generate Password next to the alias. Folders: INBOX, Drafts, Sent Mail, Trash, Spam and Archive.

## Questions

### Does Gnus work on Windows?

Yes, it runs natively on Windows. Gnus runs in native Windows builds of GNU Emacs.

### Does Gnus support IMAP?

Yes, Gnus connects to IMAP servers directly.

### Is Gnus open source?

Yes, under the GPL 3.0 or later.

### How do I use Gnus with Forward Email?

Use the config in the Forward Email section on this page, saved as ~/.emacs.d/init.el, and replace the address and password with your own.

## Sources

- https://www.gnus.org/
- https://gnus.org/manual.html
- https://gnus.org/history.html
- https://www.gnu.org/software/emacs/manual/gnus.html
- https://github.com/emacs-mirror/emacs/blob/emacs-31/lisp/gnus/gnus.el
- https://github.com/emacs-mirror/emacs/blob/emacs-31/lisp/gnus/nnimap.el
- https://github.com/emacs-mirror/emacs/blob/emacs-31/lisp/gnus/gnus-search.el
- https://github.com/emacs-mirror/emacs/blob/emacs-31/lisp/gnus/gnus-icalendar.el
- https://github.com/emacs-mirror/emacs/blob/emacs-31/lisp/gnus/nnmaildir.el
- https://github.com/emacs-mirror/emacs/blob/emacs-31/lisp/gnus/mml-smime.el
- https://github.com/emacs-mirror/emacs/blob/emacs-31/lisp/mail/smtpmail.el
- https://ftp.gnu.org/gnu/emacs/
- https://packages.debian.org/trixie/emacs
- https://mdapi.fedoraproject.org/rawhide/pkg/emacs
- https://archlinux.org/packages/extra/x86_64/emacs/
- https://formulae.brew.sh/formula/emacs
- https://formulae.brew.sh/cask/emacs-app
- https://github.com/microsoft/winget-pkgs/tree/master/manifests/g/GNU/Emacs
- https://github.com/ScoopInstaller/Extras/blob/master/bucket/emacs.json
- https://github.com/freebsd/freebsd-ports/blob/main/editors/emacs/Makefile
- https://github.com/openbsd/ports/blob/master/editors/emacs/Makefile
- https://github.com/termux/termux-packages/blob/master/packages/emacs/build.sh
- https://github.com/forwardemail/forwardemail.net/blob/master/helpers/ensure-default-mailboxes.js
