# getmail6

> Mail retriever that downloads messages over POP3 or IMAP into Maildir, mbox or an external delivery program.

getmail6 is the Python 3 continuation of getmail. It fetches mail one way from POP3 or IMAP servers and delivers it to a Maildir, an mboxrd file or a program such as procmail or maildrop, with optional filtering. Each account has its own rc file. It suits users who want a simple download into local storage rather than a two-way IMAP sync.

- Type: Mail tool
- Interface: Command-line tools and prompts
- Systems: Runs on Linux, macOS and BSD, on Windows through WSL. Not available for Android.
- Language: Python
- License: GPL 2.0 (GPL-2.0-only)
- Latest version: 6.20.01
- Background: Python 3 fork of getmail 5 by Charles Cazabon
- Maintained: yes
- Website: https://getmail6.org/
- Source: https://github.com/getmail6/getmail6
- Documentation: https://getmail6.org/configuration.html

## Install

### Linux

Native.

- apt: `sudo apt install getmail6`
- dnf: `sudo dnf install getmail6`
- pip: `pip install getmail6`

### macOS

Native.

- Homebrew: `brew install getmail6`
- MacPorts: `sudo port install getmail6`

### Windows

Through WSL. No native Windows package; use WSL.

- WSL: `sudo apt install getmail6`

### BSD

Native.

- FreeBSD pkg: `pkg install py312-getmail6`

### Android

Not supported.

## Protocols

- IMAP: Yes
- POP3: Yes
- SMTP: No
- JMAP: No
- Maildir: Yes
- mbox: Yes
- notmuch: No

## Features

- OpenPGP: No
- S/MIME: No
- OAuth2 sign-in: Yes
- Threads: No
- Search: No
- HTML mail: No
- Mouse: No
- Multiple accounts: Yes
- Offline use: downloads mail to a local Maildir or mbox
- Calendar: No
- Contacts: No
- Vim-style keys: No
- Configuration: one getmailrc INI file per account in ~/.config/getmail/

## Pros

- Supports both POP3 and IMAP, including SSL variants
- Delivers to Maildir, mboxrd or an external MDA with filters
- password_command reads the password from an external program

## Cons

- One-way download only; changes are not synced back to the server
- Needs one rc file per account
- No sending; pair it with an SMTP tool such as msmtp

## Use getmail6 with Forward Email

File: `~/.config/getmail/getmailrc`

```
# IMAP over SSL into a Maildir (create it first: mkdir -p ~/Mail/forwardemail/INBOX/{cur,new,tmp})
[retriever]
type = SimpleIMAPSSLRetriever
server = imap.forwardemail.net
port = 993
username = you@example.com
password_command = ("pass", "show", "forwardemail/you@example.com")

[destination]
type = Maildir
path = ~/Mail/forwardemail/INBOX/

[options]
read_all = false
delete = false

# For POP3 instead: type = SimplePOP3SSLRetriever, server = pop3.forwardemail.net, port = 995
```

| 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 getmail6 work on Windows?

Not natively. It runs in Windows Subsystem for Linux (WSL). No native Windows package; use WSL.

### Does getmail6 support IMAP?

Yes, getmail6 connects to IMAP servers directly.

### Is getmail6 open source?

Yes, under the GPL 2.0.

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

Use the config in the Forward Email section on this page, saved as ~/.config/getmail/getmailrc, and replace the address and password with your own.

## Sources

- https://getmail6.org/
- https://getmail6.org/configuration.html
- https://github.com/getmail6/getmail6
- https://github.com/getmail6/getmail6/blob/master/README
- https://github.com/getmail6/getmail6/blob/master/docs/configuration.txt
- https://github.com/getmail6/getmail6/blob/master/docs/getmailrc-examples
- https://packages.debian.org/search?keywords=getmail6&searchon=names&exact=1
- https://packages.ubuntu.com/getmail6
- https://mdapi.fedoraproject.org/rawhide/pkg/getmail6
- https://formulae.brew.sh/formula/getmail6
- https://ports.macports.org/port/getmail6/
- https://www.freshports.org/mail/getmail6/
