2. Usage

2.1. Commandline invocation

alot [-r] [-c CONFIGFILE] [-n NOTMUCHCONFIGFILE] [-C {1,16,256}] [-p DB_PATH]
     [-d {debug,info,warning,error}] [-l LOGFILE] [-v] [-h] [command]

Options

-r, --read-only
 open db in read only mode
-c, --config=FILENAME
 config file (default: ~/.config/alot/config)
-n, --notmuch-config=FILENAME
 notmuch config (default: $NOTMUCH_CONFIG or ~/.notmuch-config)
-C, --colour-mode=COLOUR
 terminal colour mode (default: 256). Must be 1, 16 or 256
-p, --mailindex-path=PATH
 path to notmuch index
-d, --debug-level=LEVEL
 debug log (default: info). Must be one of debug,info,warning or error
-l, --logfile=FILENAME
 logfile (default: /dev/null)
-v, --version Display version string and exit
-h, --help Display help and exit
UNIX Signals
SIGUSR1
Refreshes the current buffer. Useful for telling alot to refresh the view from a mail downloader e.g. Offlineimap.

Subommands

search
start in a search buffer using the querystring provided as parameter. See also the SEARCH SYNTAX section of notmuch(1) and the output of alot search –help.
compose
compose a new message See the output of alot compose –help for more info on parameters.
pyshell
start the interactive python shell inside alot See the output of alot pyshell –help for more info on parameters.

2.2. First Steps

The arrow keys, page-up/down, j, k and Space can be used to move the focus. Escape cancels prompts and Enter selects. Hit : at any time and type in commands to the prompt.

The interface shows one buffer at a time, you can use Tab and Shift-Tab to switch between them, close the current buffer with d and list them all with ;.

The buffer type or mode (displayed at the bottom left) determines which prompt commands are available. Usage information on any command can be listed by typing help YOURCOMMAND to the prompt; The key bindings for the current mode are listed upon pressing ?.

2.3. Commands

Alot interprets user input as command line strings given via its prompt or bound to keys in the config. Command lines are semi-colon separated command strings, each of which starts with a command name and possibly followed by arguments.

See the sections below for which commands are available in which (UI) mode. global commands are available independently of the mode.

modes/global
globally available commands
modes/search
commands available when showing thread search results
modes/thread
commands available while displaying a thread
modes/envelope
commands during message composition
modes/bufferlist
commands while listing active buffers
modes/taglist
commands while listing all tagstrings present in the notmuch database

2.4. Cryptography

Alot has built in support for constructing signed and/or encrypted mails according to PGP/MIME (RFC 3156, RFC 3156) via gnupg. It does however rely on a running gpg-agent to handle password entries.

Note

You need to have gpg-agent running to use GPG with alot!

gpg-agent will handle passphrase entry in a secure and configurable way, and it will cache your passphrase for some time so you don’t have to enter it over and over again. For details on how to set this up we refer to gnupg’s manual.

Signing outgoing emails

You can use the commands sign, unsign and togglesign in envelope mode to determine if you want this mail signed and if so, which key to use. To specify the key to use you may pass a hint string as argument to the sign or togglesign command. This hint would typically be a fingerprint or an email address associated (by gnupg) with a key.

Signing (and hence passwd entry) will be done at most once shortly before a mail is sent.

In case no key is specified, alot will leave the selection of a suitable key to gnupg so you can influence that by setting the default-key option in ~/.gnupg/gpg.conf accordingly.

You can set the default to-sign bit and the key to use for each account individually using the options sign_by_default and gpg_key.

Encrypt outgoing emails

You can use the commands encrypt, unencrypt and and toggleencrypt and in envelope mode to ask alot to encrypt the mail before sending. The encrypt command accepts an optional hint string as argument to determine the key of the recipient.

You can set the default to-encrypt bit for each account individually using the option encrypt_by_default.

Note

If you want to access encrypt mail later it is useful to add yourself to the list of recipients when encrypting with gpg (not the recipients whom mail is actually send to). The simplest way to do this is to use the encrypt-to option in the ~/.gnupg/gpg.conf. But you might have to specify the correct encryption subkey otherwise gpg seems to throw an error.