Skip to content

Templates, signatures and composing

Start a compose

Key Starts
n a new message
r a reply to the sender
R a reply to all
L a reply to the list
f a forward

From the command line, :template <name> opens a compose from a saved template, :resume <draft-path> reopens a saved draft, and :unsubscribe composes an unsubscribe request for the selected message.

The fields stage

A compose opens on the fields stage: To, Cc, Bcc and Subject are edited in place, and From cycles through your configured identities.

Key Does
tab / shift-tab move between fields
left / right / space on From, cycle the identity
ctrl-e (or ctrl-h) open $EDITOR on the body, and back
esc back out of the compose

Only the body passes through $EDITOR; the headers stay structured fields. By default the editor runs inside the client; to hand the whole terminal over instead:

[ui]
composer = "suspend"       # embedded | suspend

The review screen

Leaving the editor lands on a review screen showing the recipients, subject, seal plan, attachments and the first body lines. Nothing is sent until you press y.

Key Does
y send (sealed per the plan, queued for antiphond)
e edit the body again (ctrl-e too)
h edit the header fields again (ctrl-h too)
a add an attachment (path prompt, ~ expands)
d remove the selected attachment
j / k move the attachment selection
s toggle signing for this message
x toggle encryption for this message
k toggle a read-receipt request for this message
@ schedule the send for later
q close, asking first whether to save a draft

Attachments are read in full when added, so a bad path fails at the prompt rather than at send time. q writes the compose to store/drafts/ and names the file in the status line; reopen it with :resume <path>.

Signatures

A signature is either a plain-text file under ~/.config/antiphon/signatures/<name> (a bare name, no extension) or, when the value spans more than one line, the signature text itself. Point an identity at a file by name in the account file:

[[identity]]
address = "you@example.com"
signature = "personal"     # reads signatures/personal

A block typed straight into the account form's identities row is stored inline and used verbatim; a single-line value is always read as a file name. Either way the text is appended to the body of mail sent from that identity, beneath the conventional -- separator. Identities, the signature reference included, can also be edited in the client through the account form's identities row (see the settings view).

Templates

A template is a plain-text file under ~/.config/antiphon/templates/<name> (bare name, no extension). Open a compose from it with:

:template <name>

Templates named new and reply, when present, apply themselves to every fresh compose and reply. The tokens {from}, {name}, {date} and {quoted} expand to the sending address, its display name, the original message's date and the quoted original; unknown braces pass through unchanged.

OpenPGP at compose time

pgp_sign on an identity sets its default; signing is off unless enabled:

[[identity]]
address = "you@example.com"
pgp_sign = true
pgp_key = "your-fingerprint"   # optional; else picked by address

Before composing, :sign, :nosign, :encrypt and :noencrypt override the default for the next message only; the compose status line shows the resulting plan ([sign], [sign+encrypt]). On the review screen, s and x toggle the same per message.

Signing goes through gpg-agent, so pinentry and smartcards work as they do for gpg. Encryption needs a cert for every To and Cc address in the trusted keyring (.asc/.pgp files under the config directory's pgp/; see OpenPGP). If a cert is missing, signing fails or the agent refuses, nothing is sent: the compose stays on the review screen and the status line names the problem.

Machine state and data

State goes to $XDG_STATE_HOME/antiphon, caches to $XDG_CACHE_HOME/antiphon, and the message store, index, operation log, outbox and sync state to $XDG_DATA_HOME/antiphon/store. antiphon doctor reports every resolved path; antiphon doctor --init-store creates or repairs the store.