Terminal Email

getmail6

CLIMail tool

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
Latest version
6.20.01
Background
Python 3 fork of getmail 5 by Charles Cazabon
Maintained
Yes
Website
getmail6.org
Source
github.com/getmail6/getmail6
Documentation
getmail6.org

Install

SystemSupportInstall
LinuxNative
aptsudo apt install getmail6
dnfsudo dnf install getmail6
pippip install getmail6
macOSNative
Homebrewbrew install getmail6
MacPortssudo port install getmail6
WindowsThrough WSL
WSLsudo apt install getmail6

No native Windows package; use WSL.

BSDNative
FreeBSD pkgpkg install py312-getmail6
AndroidNot supported-

Protocols and features

Protocols
Protocolgetmail6
IMAPYes
POP3Yes
SMTPNo
JMAPNo
MaildirYes
mboxYes
notmuchNo
Features
Featuregetmail6
OpenPGPNo
S/MIMENo
OAuth2 sign-inYes
ThreadsNo
SearchNo
HTML mailNo
MouseNo
Multiple accountsYes
Offline usedownloads mail to a local Maildir or mbox
CalendarNo
ContactsNo
Vim-style keysNo
Configurationone getmailrc INI file per account in ~/.config/getmail/

Pros and cons

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

How getmail6 fits with a Forward Email mailbox. Replace you@example.com with your alias and the password command with your own. The same settings work with any provider once the server names change.

~/.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
ProtocolServerPortSecurity
IMAPimap.forwardemail.net993SSL/TLS
POP3pop3.forwardemail.net995SSL/TLS
SMTPsmtp.forwardemail.net465SSL/TLS
SMTPsmtp.forwardemail.net587STARTTLS

Username: your full alias address, such as you@example.com. Password: the one shown by Generate Password next to the alias in your Forward Email account. Folders: INBOX, Drafts, Sent Mail, Trash, Spam and Archive.

Prefer no config at all? Forward Email's terminal app signs in with your account and has mail, calendar and contacts in one program.

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