AERC(1) | General Commands Manual | AERC(1) |
NAME¶
aerc - a pretty good email client.
SYNOPSIS¶
aerc [-v] [-a <account>[,<account>]] [mailto:...]
For a guided tutorial, use :help tutorial from aerc, or man aerc-tutorial from your terminal.
OPTIONS¶
-v
-a <account>[,<account>]
mailto:address[,address][?query[&query]]
Query | Description |
subject=<text> | Subject line will be completed with the <text> |
body=<text> | Message body will be completed with the <text> |
cc=<address>[,<address>] | Cc header will be completed with the list of addresses |
bcc=<address>[,<address>] | Bcc header will be completed with the list of addresses |
in-reply-to=<message-id> | In-reply-to header will be set to the message id |
account=<accountname> | Specify the account (must be in accounts.conf; default is the selected account) |
template=<template-file> | Template sets the template file for creating the message |
:command [...]
RUNTIME COMMANDS¶
To execute a command, press : to bring up the command interface. Commands may also be bound to keys, see aerc-binds(5) for details. In some contexts, such as the terminal emulator, <c-x> is used to bring up the command interface.
Different commands work in different contexts, depending on the kind of tab you have selected.
Dynamic arguments are expanded following aerc-templates(7) depending on the context. For example, if you have a message selected, the following command:
:filter -f "{{index (.From | emails) 0}}"
Will filter all messages sent by the same sender.
Aerc stores a history of commands, which can be cycled through in command mode. Pressing the up key cycles backwards in history, while pressing down cycles forwards.
GLOBAL COMMANDS¶
These commands work in any context.
:help <topic>
:help keys
:new-account [-t]
-t: Create a temporary account. Do not modify accounts.conf.
:cd <directory>
:z <directory or zoxide query>
:change-tab [+|-]<tab name or
index>
:ct [+|-]<tab name or index>
:exec <command>
Note: commands executed in this way are not executed with the shell.
:eml [<path>]
:preview
Can also be used in the message viewer to open an rfc822 attachment or in the composer to preview the message.
:pwd
:term [<command>...]
:terminal
:move-tab [+|-]<index>
:prev-tab [<n>]
:next-tab [<n>]
:pin-tab
:unpin-tab
:prompt <prompt> <command>...
:choose -o <key> <text> <command> [-o <key> <text> <command>]...
:quit [-f]
:exit [-f]
MESSAGE COMMANDS¶
These commands are valid in any context that has a selected message (e.g. the message list, the message in the message viewer, etc).
:archive <scheme>
flat: No special structure, all messages in the archive directory
year: Messages are stored in folders per year
month: Messages are stored in folders per year and subfolders per month
:accept [-e|-E]
-e: Forces [compose].edit-headers = true for this message only.
-E: Forces [compose].edit-headers = false for this message only.
:accept-tentative [-e|-E]
-e: Forces [compose].edit-headers = true for this message only.
-E: Forces [compose].edit-headers = false for this message only.
:copy <target>
:cp <target>
:decline [-e|-E]
-e: Forces [compose].edit-headers = true for this message only.
-E: Forces [compose].edit-headers = false for this message only.
:delete
:delete-message
:envelope [-h] [-s <format-specifier>]
-h: Show all header fields
-s <format-specifier>
:recall [-f] [-e|-E]
-f: Open the message for re-editing even if it is not in the postpone directory. Aerc remembers the folder, so the further :postpone call will save the message back there.
-e: Forces [compose].edit-headers = true for this message only.
-E: Forces [compose].edit-headers = false for this message only.
Original recalled messages are deleted if they are sent or postponed again. In both cases you have another copy of the message somewhere. Otherwise the recalled message is left intact. This happens if the recalled message is discarded after editing. It can be deleted with :rm if it is not needed.
:forward [-A|-F] [-T <template-file>] [-e|-E] [<address>...]
-A: Forward the message and all attachments.
-F: Forward the full message as an RFC 2822 attachment.
-T <template-file>
-e: Forces [compose].edit-headers = true for this message only.
-E: Forces [compose].edit-headers = false for this message only.
:move <target>
:mv <target>
:pipe [-bmp] <cmd>
Operates on multiple messages when they are marked. When piping multiple messages, aerc will write them with mbox format separators.
-b: Run the command in the background instead of opening a terminal tab
-m: Pipe the full message
-p: Pipe just the selected message part, if applicable
This can be used to apply patch series with git:
When at least one marked message subject matches a patch series (e.g. [PATCH X/Y]), all marked messages will be sorted by subject to ensure that the patches are applied in order.
:reply [-acq] [-T <template-file>] [-e|-E]
-a: Reply all
-c: Close the view tab when replying. If the reply is not sent, reopen the view tab.
-q: Insert a quoted version of the selected message into the reply editor
-T <template-file>
-e: Forces [compose].edit-headers = true for this message only.
-E: Forces [compose].edit-headers = false for this message only.
:read [-t]
-t: Toggle the messages between read and unread.
:unread [-t]
-t: Toggle the messages between read and unread.
:flag [-t] [-a | -x <flag>]
-t: Toggle the flag instead of setting (enabling) it.
-a: Mark message as answered/unanswered.
-x <flag>: Mark message with specific flag.
Seen
:unflag [-t] <flag>
:modify-labels [+|-]<label>...
:tag [+|-]<label>...
Example: add inbox and unread labels, remove spam label.
:unsubscribe [-e|-E]
-e: Forces [compose].edit-headers = true for this message only.
-E: Forces [compose].edit-headers = false for this message only.
MESSAGE LIST COMMANDS¶
:disconnect
:connect
:clear [-s]
By default, the selected message will be kept. To clear the selected message and move cursor to the top of the message list, use the -s flag.
-s: Selects the message at the top of the message list after clearing.
:cf <folder>
:check-mail
:compose [-H "<header>: <value>"] [-T <template-file>] [-e|-E] [<body>]
-H "<header>: <value>"
-T <template-file>
-e: Forces [compose].edit-headers = true for this message only.
-E: Forces [compose].edit-headers = false for this message only.
<body>: The initial message body.
:recover [-f] [-e|-E] <file>
-f: Delete the <file> after opening the composer.
-e: Forces [compose].edit-headers = true for this message only.
-E: Forces [compose].edit-headers = false for this message only.
:filter [<options>] <terms>...
:mkdir <name>
:rmdir [-f]
By default, it will fail if the directory is non-empty (see -f).
-f
Some programs that sync maildirs may recover deleted directories (e.g. offlineimap). These can either be specially configured to properly handle directory deletion, or special commands need to be run to delete directories (e.g. offlineimap --delete-folder).
It is possible, with a slow connection and the imap backend, that new messages arrive in the directory before they show up - using :rmdir at this moment would delete the directory and such new messages before the user sees them.
:next <n>[%]
:next-message <n>[%]
:prev <n>[%]
:prev-message <n>[%]
:next-folder <n>
:prev-folder <n>
:expand-folder
:collapse-folder
:export-mbox <file>
:import-mbox <file>
:next-result
:prev-result
:search [<options>] <terms>...
:select <n>
:select-message <n>
:split [[+|-]<n>]
:sort [[-r] <criterion>]...
Available criteria:
Criterion | Description |
arrival | Date and time of the messages arrival |
cc | Addresses in the Cc field |
date | Date and time of the message |
from | Addresses in the From field |
read | Presence of the read flag |
size | Size of the message |
subject | Subject of the message |
to | Addresses in the To field |
:toggle-threads
:fold
:unfold
:toggle-thread-context
:view [-p]
:view-message [-p]
:vsplit [[+|-]<n>]
MESSAGE VIEW COMMANDS¶
:close
:next <n>[%]
:prev <n>[%]
:next-part
:prev-part
:open [-d] [<args...>]
-d: Delete the temporary file after the opener exits
When arguments are provided:
:open-link <url> [<args...>]
:save [-fpaA] <path>
-f: Overwrite the destination whether or not it exists
-p: Create any directories in the path that do not exist
-a: Save all attachments. Individual filenames cannot be specified.
-A: Same as -a but saves all the named parts, not just attachments.
:mark [-atvT]
-a: Apply to all messages in the current folder
-t: toggle the mark state instead of marking a message
-v: Enter / leave visual mark mode
-V: Same as -v but does not clear existing selection
-T: Marks the displayed message thread of the selected message.
:unmark [-at]
-a: Apply to all messages in the current folder
-t: toggle the mark state instead of unmarking a message
:remark
:toggle-headers
:toggle-key-passthrough
MESSAGE COMPOSE COMMANDS¶
:abort
If the text editor exits with an error (e.g. :cq in vim(1)), the message is immediately discarded.
:attach <path>
:attach -m [<arg>]
:attach -r <name> <cmd>
-m [<arg>]
-r <name> <cmd>
:attach-key
:detach [<path>]
:cc <addresses>
:bcc <addresses>
:edit [-e|-E]
-e: Forces [compose].edit-headers = true for this message only.
-E: Forces [compose].edit-headers = false for this message only.
:multipart [-d] <mime/type>
-d:
:next-field
:prev-field
:postpone [-t <folder>]
-t: Overrides the target folder for saving the message
If the message was force-recalled with :recall -f from a different folder, the :postpone command will save it back to that folder instead of the default postpone folder configured in settings. Use -t to override that or use :mv to move the saved message to a different folder.
:save [-p] <path>
:send [-a <scheme>]
-a: Archive the message being replied to. See :archive for schemes.
:switch-account <account-name>
:switch-account -n
:switch-account -p
-p: switch to previous account
-n: switch to next account
:header [-f] <name> [<value>] :header [-d] <name>
-f: Overwrite any existing header.
-d: Remove the header instead of adding it.
:encrypt
:sign
TERMINAL COMMANDS¶
:close
LOGGING¶
Aerc does not log by default, but collecting log output can be useful for troubleshooting and reporting issues. Redirecting stdout when invoking aerc will write log messages to that file:
Persistent logging can be configured via the log-file and log-level settings in aerc.conf.
SEE ALSO¶
aerc-config(5) aerc-imap(5) aerc-jmap(5) aerc-notmuch(5) aerc-smtp(5) aerc-maildir(5) aerc-sendmail(5) aerc-search(1) aerc-stylesets(7) aerc-templates(7) aerc-accounts(5) aerc-binds(5) aerc-tutorial(7)
AUTHORS¶
Originally created by Drew DeVault and maintained by Robin Jarry who is assisted by other open source contributors. For more information about aerc development, see https://sr.ht/~rjarry/aerc/.
2023-09-28 |