Terminal Email

Forward Email settings for terminal email clients

Server names, ports and a working config for each client and tool on this site.

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.

Forward Email's own terminal app needs none of this: install it with npm install -g forwardemail or the standalone build, run forwardemail and sign in.

Configs

aerc

~/.config/aerc/accounts.conf (macOS: ~/Library/Preferences/aerc/accounts.conf)
# Forward Email: IMAP over SSL/TLS (993), SMTP over SSL/TLS (465)
# The @ in the username is URL-encoded as %40
[Forward Email]
source            = imaps://you%40example.com@imap.forwardemail.net:993
source-cred-cmd   = pass show email/forwardemail
outgoing          = smtps://you%40example.com@smtp.forwardemail.net:465
outgoing-cred-cmd = pass show email/forwardemail
from              = Your Name <you@example.com>
default           = INBOX
copy-to           = Sent Mail
postpone          = Drafts

alot

~/.config/alot/config (plus ~/.mbsyncrc and ~/.config/msmtp/config)
# alot reads a local notmuch database. Sync Forward Email over IMAP
# into a Maildir with mbsync, index it with notmuch, and send with msmtp.

# ~/.mbsyncrc (isync 1.5+; older versions use SSLType instead of TLSType)
IMAPAccount forwardemail
Host imap.forwardemail.net
Port 993
TLSType IMAPS
User you@example.com
PassCmd "pass show email/forwardemail"

IMAPStore forwardemail-remote
Account forwardemail

MaildirStore forwardemail-local
Path ~/Mail/forwardemail/
Inbox ~/Mail/forwardemail/INBOX
SubFolders Verbatim

Channel forwardemail
Far :forwardemail-remote:
Near :forwardemail-local:
Patterns *
Create Both
SyncState *

# Then run: mbsync forwardemail && notmuch setup && notmuch new

# ~/.config/msmtp/config
account forwardemail
host smtp.forwardemail.net
port 465
tls on
tls_starttls off
auth on
user you@example.com
passwordeval "pass show email/forwardemail"
from you@example.com

# ~/.config/alot/config
[accounts]
    [[forwardemail]]
        realname = Your Name
        address = you@example.com
        sendmail_command = msmtp --account=forwardemail -t
        sent_box = maildir://~/Mail/forwardemail/Sent Mail
        draft_box = maildir://~/Mail/forwardemail/Drafts

Alpine

~/.pinerc
# Forward Email: IMAP over SSL/TLS (993), SMTP over SSL/TLS (465)
# Set these in Setup > Config, or edit ~/.pinerc while Alpine is closed.
# Alpine has no password command; it prompts and can save passwords
# in its encrypted password file.
personal-name=Your Name
user-domain=example.com
customized-hdrs=From: Your Name <you@example.com>
inbox-path={imap.forwardemail.net:993/ssl/user=you@example.com}INBOX
folder-collections=ForwardEmail {imap.forwardemail.net:993/ssl/user=you@example.com}[]
default-fcc={imap.forwardemail.net:993/ssl/user=you@example.com}Sent Mail
postponed-folder={imap.forwardemail.net:993/ssl/user=you@example.com}Drafts
smtp-server=smtp.forwardemail.net:465/ssl/user=you@example.com

Cone

~/.cone (written by the setup screens)
# Cone is configured from its menus; settings are saved under ~/.cone.
# IMAP account: Main menu > N (New account) > I (IMAP account)
#   Server: imap.forwardemail.net   (port 993 is the default with encryption on)
#   Login: you@example.com
#   [x] Use an encrypted connection
#   Enter the alias' generated password when prompted.
# (POP3 instead: N > P (POP3 account), Server: pop3.forwardemail.net, encrypted connection on (port 995))
#
# Outgoing mail: Main menu > S (Setup)
#   Outgoing SMTP Server: smtp.forwardemail.net
#   SMTP userid (optional): you@example.com
#   [ ] Send mail via main acct (if available)
#   [x] Use SMTP tunneled over SSL      (uses port 465)
#
# Optional: Main menu > P (Master password) to encrypt the saved passwords.

getmail6

~/.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

Gnus

~/.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

Himalaya

~/.config/himalaya/config.toml
# Forward Email: IMAP over SSL/TLS (993), SMTP over SSL/TLS (465)
[accounts.forwardemail]
default = true
email = "you@example.com"
display-name = "Your Name"

imap.server = "imaps://imap.forwardemail.net:993"
imap.sasl.plain.username = "you@example.com"
imap.sasl.plain.password.command = "pass show email/forwardemail"

smtp.server = "smtps://smtp.forwardemail.net:465"
smtp.sasl.plain.username = "you@example.com"
smtp.sasl.plain.password.command = "pass show email/forwardemail"

# IMAP reports only the inbox role, so map the other folders by name
mailbox.alias.sent = "Sent Mail"
mailbox.alias.drafts = "Drafts"
mailbox.alias.trash = "Trash"

isync

~/.mbsyncrc
# Sync a Forward Email mailbox to ~/Mail/forwardemail (run: mkdir -p ~/Mail/forwardemail)
# TLSType needs isync 1.5 or newer; on 1.4 write "SSLType IMAPS" instead.
IMAPAccount forwardemail
Host imap.forwardemail.net
Port 993
User you@example.com
PassCmd "pass show forwardemail/you@example.com"
TLSType IMAPS

IMAPStore forwardemail-remote
Account forwardemail

MaildirStore forwardemail-local
SubFolders Verbatim
Path ~/Mail/forwardemail/
Inbox ~/Mail/forwardemail/INBOX

Channel forwardemail
Far :forwardemail-remote:
Near :forwardemail-local:
Patterns *
Create Both
Expunge Both
SyncState *

# Then run: mbsync forwardemail

Matcha

~/.config/matcha/config.json
{
  "accounts": [
    {
      "id": "forwardemail",
      "name": "Your Name",
      "email": "you@example.com",
      "service_provider": "custom",
      "imap_server": "imap.forwardemail.net",
      "imap_port": 993,
      "smtp_server": "smtp.forwardemail.net",
      "smtp_port": 465,
      "pass_cmd": "pass show forwardemail/you@example.com"
    }
  ]
}

mblaze

~/.mbsyncrc, ~/.config/msmtp/config and ~/.mblaze/profile
# 1) ~/.mbsyncrc: sync to ~/Mail/forwardemail (isync 1.5+ syntax)
IMAPAccount forwardemail
Host imap.forwardemail.net
Port 993
User you@example.com
PassCmd "pass show email/forwardemail"
TLSType IMAPS

IMAPStore forwardemail-remote
Account forwardemail

MaildirStore forwardemail-local
SubFolders Verbatim
Path ~/Mail/forwardemail/
Inbox ~/Mail/forwardemail/INBOX

Channel forwardemail
Far :forwardemail-remote:
Near :forwardemail-local:
Patterns *
Create Both
SyncState *

# 2) ~/.config/msmtp/config (chmod 600)
account forwardemail
host smtp.forwardemail.net
port 465
tls on
tls_starttls off
auth on
user you@example.com
passwordeval "pass show email/forwardemail"
from you@example.com
account default : forwardemail

# 3) ~/.mblaze/profile
Local-Mailbox: Your Name <you@example.com>
Maildir: ~/Mail/forwardemail
Outbox: ~/Mail/forwardemail/Sent Mail
Sendmail: msmtp

# Usage: mbsync forwardemail; mlist ~/Mail/forwardemail/INBOX | mthread | mscan

meli

~/.config/meli/config.toml
# Forward Email: IMAP over SSL/TLS (993), SMTP over SSL/TLS (465)
[accounts."forwardemail"]
format = "imap"
root_mailbox = "INBOX"
subscribed_mailboxes = ["*"]
identity = "you@example.com"
display_name = "Your Name"
server_hostname = "imap.forwardemail.net"
server_port = 993
use_tls = true
server_username = "you@example.com"
server_password_command = "pass show email/forwardemail"
send_mail = { hostname = "smtp.forwardemail.net", port = 465, auth = { type = "auto", username = "you@example.com", password = { type = "command_eval", value = "pass show email/forwardemail" } }, security = { type = "TLS" } }

msmtp

~/.msmtprc
defaults
auth           on
tls            on
# Debian/Ubuntu path; omit this line to use the system default trust store
tls_trust_file /etc/ssl/certs/ca-certificates.crt
logfile        ~/.msmtp.log

account        forwardemail
host           smtp.forwardemail.net
port           465
tls_starttls   off
from           you@example.com
user           you@example.com
passwordeval   pass show forwardemail/you@example.com

account default : forwardemail

# Test: printf 'Subject: test\n\nhello\n' | msmtp you@example.com

mu4e

~/.mbsyncrc and ~/.emacs.d/init.el
# 1) ~/.mbsyncrc: sync the mailbox to ~/Mail/forwardemail (isync 1.5+ syntax)
IMAPAccount forwardemail
Host imap.forwardemail.net
Port 993
User you@example.com
PassCmd "pass show email/forwardemail"
TLSType IMAPS

IMAPStore forwardemail-remote
Account forwardemail

MaildirStore forwardemail-local
SubFolders Verbatim
Path ~/Mail/forwardemail/
Inbox ~/Mail/forwardemail/INBOX

Channel forwardemail
Far :forwardemail-remote:
Near :forwardemail-local:
Patterns * !Drafts
Create Both
Expunge Both
SyncState *

# 2) First sync and index:
#    mbsync forwardemail
#    mu init --maildir=~/Mail --personal-address=you@example.com && mu index

# 3) ~/.emacs.d/init.el
(require 'mu4e)
(setq user-mail-address "you@example.com"
      user-full-name "Your Name"
      mu4e-get-mail-command "mbsync forwardemail"
      mu4e-change-filenames-when-moving t
      mu4e-sent-folder "/forwardemail/Sent Mail"
      mu4e-drafts-folder "/forwardemail/Drafts"
      mu4e-trash-folder "/forwardemail/Trash"
      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")

# 4) SMTP password in ~/.authinfo.gpg (read by Emacs auth-source):
# machine smtp.forwardemail.net login you@example.com port 465 password YOUR-GENERATED-PASSWORD

Mutt

~/.muttrc
# Forward Email: IMAP over SSL/TLS (993), SMTP over SSL/TLS (465)
set realname = "Your Name"
set from = "you@example.com"

set imap_user = "you@example.com"
set imap_pass = "`pass show email/forwardemail`"
set folder = "imaps://imap.forwardemail.net:993/"
set spoolfile = "+INBOX"
set record = "+Sent Mail"
set postponed = "+Drafts"
set trash = "+Trash"

# The @ in the username is URL-encoded as %40
set smtp_url = "smtps://you%40example.com@smtp.forwardemail.net:465/"
set smtp_pass = "`pass show email/forwardemail`"
set ssl_force_tls = yes

mutt-wizard

Generated: ~/.config/mutt/, ~/.mbsyncrc and ~/.config/msmtp/config
# IMAP (mbsync) + SMTP (msmtp); the password is prompted for and stored in pass
mw -a you@example.com -n "Your Name" \
   -i imap.forwardemail.net -I 993 \
   -s smtp.forwardemail.net -S 465

# Or POP3 with mpop instead of IMAP:
# mw -a you@example.com -n "Your Name" -p -i pop3.forwardemail.net -I 995 -s smtp.forwardemail.net -S 465

# Then: mailsync    (download mail)
#       neomutt     (read and send)

NeoMutt

~/.config/neomutt/neomuttrc
# Forward Email: IMAP over SSL/TLS (993), SMTP over SSL/TLS (465)
set real_name = "Your Name"
set from = "you@example.com"

set imap_user = "you@example.com"
set imap_pass = "`pass show email/forwardemail`"
set folder = "imaps://imap.forwardemail.net:993"
set spool_file = "+INBOX"
set record = "+Sent Mail"
set postponed = "+Drafts"
set trash = "+Trash"

set smtp_url = "smtps://smtp.forwardemail.net:465"
set smtp_user = "you@example.com"
set smtp_pass = "`pass show email/forwardemail`"
set ssl_force_tls = yes

nmail

~/.config/nmail/main.conf
address=you@example.com
name=Your Name
user=you@example.com
imap_host=imap.forwardemail.net
imap_port=993
smtp_host=smtp.forwardemail.net
smtp_port=465
# Folder names must match the folders on the server
inbox=INBOX
drafts=Drafts
sent=Sent Mail
trash=Trash
spam=Spam
# Prompt for the alias' generated password at start instead of storing it
save_pass=0

nmh

~/.mh_profile
# ~/.mh_profile
Path: Mail
Local-Mailbox: Your Name <you@example.com>
send: -server smtp.forwardemail.net -port 465 -initialtls -sasl -saslmech PLAIN -user you@example.com
inc: -host pop3.forwardemail.net -port 995 -initialtls -user you@example.com

# Optional per-user mts.conf: export MHMTSUSERCONF=~/.mts.conf
# mts: smtp
# servers: smtp.forwardemail.net

# Passwords: with no "credentials:" profile entry nmh reads ~/.netrc (chmod 600):
# machine smtp.forwardemail.net login you@example.com password YOUR-GENERATED-PASSWORD
# machine pop3.forwardemail.net login you@example.com password YOUR-GENERATED-PASSWORD

# Usage: inc (fetch over POP3), scan, show, comp (write), send
# For IMAP, sync with mbsync to ~/Maildir/INBOX and run: inc -file ~/Maildir/INBOX

notmuch

~/.mbsyncrc and ~/.notmuch-config
# notmuch only indexes local mail. Sync Forward Email to ~/Mail first with mbsync (~/.mbsyncrc):
IMAPAccount forwardemail
Host imap.forwardemail.net
Port 993
User you@example.com
PassCmd "pass show email/forwardemail"
TLSType IMAPS

IMAPStore forwardemail-remote
Account forwardemail

MaildirStore forwardemail-local
SubFolders Verbatim
Path ~/Mail/forwardemail/
Inbox ~/Mail/forwardemail/INBOX

Channel forwardemail
Far :forwardemail-remote:
Near :forwardemail-local:
Patterns *
Create Both
SyncState *

# ~/.notmuch-config
[database]
path=/home/you/Mail
[user]
name=Your Name
primary_email=you@example.com
[new]
tags=unread;inbox;

# Then: mbsync forwardemail && notmuch new
# Search: notmuch search tag:unread from:someone@example.org

Notmuch Emacs interface

~/.mbsyncrc, ~/.config/msmtp/config and ~/.emacs.d/init.el
# 1) ~/.mbsyncrc: sync the mailbox to ~/Mail/forwardemail (isync 1.5+ syntax)
IMAPAccount forwardemail
Host imap.forwardemail.net
Port 993
User you@example.com
PassCmd "pass show email/forwardemail"
TLSType IMAPS

IMAPStore forwardemail-remote
Account forwardemail

MaildirStore forwardemail-local
SubFolders Verbatim
Path ~/Mail/forwardemail/
Inbox ~/Mail/forwardemail/INBOX

Channel forwardemail
Far :forwardemail-remote:
Near :forwardemail-local:
Patterns *
Create Both
SyncState *

# 2) Index: run "notmuch setup" (database path ~/Mail, address you@example.com),
#    then: mbsync forwardemail && notmuch new

# 3) ~/.config/msmtp/config (chmod 600)
account forwardemail
host smtp.forwardemail.net
port 465
tls on
tls_starttls off
auth on
user you@example.com
passwordeval "pass show email/forwardemail"
from you@example.com
account default : forwardemail

# 4) ~/.emacs.d/init.el
(require 'notmuch)
(setq user-mail-address "you@example.com"
      user-full-name "Your Name"
      message-send-mail-function 'message-send-mail-with-sendmail
      sendmail-program "msmtp"
      message-sendmail-envelope-from 'header
      mail-specify-envelope-from t
      notmuch-fcc-dirs "\"forwardemail/Sent Mail\" +sent -inbox -unread")

OfflineIMAP

~/.offlineimaprc
[general]
accounts = forwardemail
pythonfile = ~/.offlineimap.py

[Account forwardemail]
localrepository = forwardemail-local
remoterepository = forwardemail-remote

[Repository forwardemail-local]
type = Maildir
localfolders = ~/Mail/forwardemail

[Repository forwardemail-remote]
type = IMAP
remotehost = imap.forwardemail.net
remoteport = 993
ssl = yes
sslcacertfile = OS-DEFAULT
remoteuser = you@example.com
remotepasseval = get_pass("forwardemail/you@example.com")

# ~/.offlineimap.py
# import subprocess
# def get_pass(name):
#     return subprocess.check_output(["pass", "show", name]).decode().splitlines()[0]

Pop

~/.bashrc (or your shell profile)
# ~/.bashrc or ~/.zshrc
export POP_SMTP_HOST=smtp.forwardemail.net
export POP_SMTP_PORT=465
export POP_SMTP_ENCRYPTION=ssl        # or port 587 with: starttls
export POP_SMTP_USERNAME=you@example.com
export POP_SMTP_PASSWORD="$(pass show email/forwardemail)"
export POP_FROM=you@example.com

# Interactive: pop
# Scripted:    pop < message.md --to friend@example.org --subject "Hello"

S-nail

~/.mailrc
# ~/.mailrc  (start with: s-nail -A forwardemail)
set v15-compat
set tls-verify=strict
# Read credentials from an encrypted netrc file
set netrc-lookup netrc-pipe='gpg -qd ~/.netrc.gpg'

account forwardemail {
  set from='Your Name <you@example.com>'
  set folder=imaps://you%40example.com@imap.forwardemail.net \
      inbox=imaps://you%40example.com@imap.forwardemail.net/INBOX \
      record="+Sent Mail"
  set mta=smtps://you%40example.com@smtp.forwardemail.net:465
}

# Decrypted contents of ~/.netrc.gpg:
# machine imap.forwardemail.net login you@example.com password YOUR-GENERATED-PASSWORD
# machine smtp.forwardemail.net login you@example.com password YOUR-GENERATED-PASSWORD
# For POP3 instead of IMAP: set inbox=pop3s://you%40example.com@pop3.forwardemail.net

Sup

~/.sup/config.yaml
# Sup reads local mail. Sync it from imap.forwardemail.net with isync (see the isync entry) into ~/Mail/forwardemail,
# send with msmtp (see the msmtp entry), then add the source once:
#   sup-add maildir:$HOME/Mail/forwardemail/INBOX
---
:accounts:
  :default:
    :name: Your Name
    :email: you@example.com
    :alternates: []
    :sendmail: msmtp -a forwardemail --read-envelope-from -t
    :gpgkey: ""

Wanderlust

~/.wl
;; ~/.wl
(setq elmo-imap4-default-server "imap.forwardemail.net"
      elmo-imap4-default-port 993
      elmo-imap4-default-stream-type 'ssl
      elmo-imap4-default-user "you@example.com"
      elmo-imap4-default-authenticate-type 'clear
      wl-default-folder "%inbox"
      wl-fcc "%\"Sent Mail\""
      wl-from "Your Name <you@example.com>"
      wl-local-domain "example.com"
      wl-smtp-posting-server "smtp.forwardemail.net"
      wl-smtp-posting-port 465
      wl-smtp-connection-type 'ssl
      wl-smtp-posting-user "you@example.com"
      wl-smtp-authenticate-type "plain")
;; Wanderlust prompts for the alias' generated password on first connect.