Skip to content

Writing mail

A compose in Antiphon moves through three stages: structured header fields, your own $EDITOR for the body, and a review screen that always gets the last word. The stage you are in always spells its keys out in the status line.

Starting one

  • N composes fresh.
  • R replies to the sender; the sending identity is resolved from the address the message was actually delivered to, so plus addresses and catch-alls answer as themselves.
  • Shift+R replies to everyone: the author (Reply-To respected) in To, every other original recipient in Cc, your own addresses dropped.
  • Shift+L replies to the mailing list a message came from (honouring Mail-Followup-To and List-Post).
  • F forwards: subject under Fwd:, the original inline between rule lines, recipients yours to fill; the message earns its F mark when the forward is sent.
  • :template <name> starts from a named template; templates called new and reply apply themselves automatically (see templates).

The fields

To, Cc, Bcc and Subject are edited in place; From cycles through your configured identities with Left / Right. Tab and Shift+Tab move between fields.

Start typing in a recipient field and matches from your own mail appear in a popover beneath it, best-ranked first: the people you write to score above the people who write to you. Tab completes, Ctrl+N / Ctrl+P select, Esc dismisses. There is no address book to maintain; recent mail is the address book.

The body

Ctrl+E opens your $EDITOR on the body alone, headers never included. By default the editor runs embedded beneath the fields; Ctrl+E toggles back and forth between fields and editor while it runs. Set composer = "suspend" to hand the whole terminal over instead.

Quit the editor (:q in vim terms) and you land on review. Quitting the very first edit without writing anything abandons the compose; it had nothing worth keeping.

Review

Nothing sends until you confirm here. The review screen shows the recipients, subject, sending identity, the seal plan, attachments and the opening of the body.

Key Does
Y send
E edit the body again
H edit the header fields again
A attach a file (path prompt, ~ expands)
D / J / K remove / select attachments
S / X toggle signing / encryption
Q close, asking first whether to keep a draft

Attachments are read in full when added, so a bad path fails at the prompt, not at send time. Signing and encryption wrap the whole message per RFC 3156 through your gpg-agent; if a certificate is missing or the agent refuses, nothing is sent and the review screen names the problem (see security).

Sending

Y writes the message to a durable outbox and nudges the daemon, which sends immediately over SMTP (or Microsoft Graph, where an account is set up that way) and files the sent copy twice: locally, and in the server's own sent folder, so other clients see it too. If the daemon or the network is down, the message sits safely queued and goes on the next pass. Exit codes never lie: once the client says sending, the message cannot be lost.

Drafts

Answer Y to the draft prompt (or press Q on review) and the compose is saved whole: fields, body, seal plan and attachment list. :resume <path> reopens it exactly as saved. Drafts also spool to the account's drafts folder on the server, so another client sees them too.

git send-email

antiphon sendmail speaks the classic sendmail contract, so git and anything else that pipes RFC 5322 to a sendmail binary can send through your queue:

[sendemail]
    sendmailcmd = antiphon sendmail

Exit 0 means the daemon has taken durable delivery. See patches for the full workflow.