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
- 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
| System | Support | Install |
|---|---|---|
| Linux | Native | apt sudo apt install getmail6dnf sudo dnf install getmail6pip pip install getmail6 |
| macOS | Native | Homebrew brew install getmail6MacPorts sudo port install getmail6 |
| Windows | Through WSL | WSL sudo apt install getmail6No native Windows package; use WSL. |
| BSD | Native | FreeBSD pkg pkg install py312-getmail6 |
| Android | Not supported | - |
Protocols and features
| Protocol | getmail6 |
|---|---|
| IMAP | Yes |
| POP3 | Yes |
| SMTP | No |
| JMAP | No |
| Maildir | Yes |
| mbox | Yes |
| notmuch | No |
| Feature | getmail6 |
|---|---|
| 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 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.
# 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, 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
- getmail6.org/
- getmail6.org/configuration.html
- github.com/getmail6/getmail6
- github.com/getmail6/getmail6/blob/master/README
- github.com/getmail6/getmail6/blob/master/docs/configuration.txt
- github.com/getmail6/getmail6/blob/master/docs/getmailrc-examples
- packages.debian.org/search?keywords=getmail6&searchon=names&exact=1
- packages.ubuntu.com/getmail6
- mdapi.fedoraproject.org/rawhide/pkg/getmail6
- formulae.brew.sh/formula/getmail6
- ports.macports.org/port/getmail6/
- freshports.org/mail/getmail6/