AERC-CONFIG(5) | File Formats Manual | AERC-CONFIG(5) |
NAME
aerc-config - configuration file format for aerc(1)
SYNOPSIS
There are three aerc config files: aerc.conf, binds.conf, and accounts.conf. The last one must be kept secret, as it may include your account credentials. We look for these files in your XDG config home plus aerc, which defaults to ~/.config/aerc. Alternate files can be specified via command line arguments, see aerc(1).
Examples of these config files are typically included with your installation of aerc and are usually installed in /usr/share/aerc.
Each file uses the ini format, and consists of sections with keys and values. A line beginning with # is considered a comment and ignored, as are empty lines. New sections begin with [section-name] on a single line, and keys and values are separated with =.
This manual page focuses on aerc.conf. binds.conf is detailed in aerc-binds(5) and accounts.conf in aerc-accounts(5).
aerc.conf is used for configuring the general appearance and behavior of aerc.
GENERAL OPTIONS
These options are configured in the [general] section of aerc.conf.
default-save-path = <path>
pgp-provider = auto|gpg|internal
Default: auto
unsafe-accounts-conf = true|false
Default: false
log-file = <path>
log-level = trace|debug|info|warn|error
Default: info
disable-ipc = true|false
Default: false
disable-ipc-mailto = true | false
Default: false
disable-ipc-mbox = true | false
Default: false
term = <TERM>
Default: xterm-256color
enable-osc8 = true|false
Default: false
default-menu-cmd = <cmd>
Any occurrence of %f will be replaced by a temporary file path where the command is expected to write output lines to be consumed by :menu. Otherwise, the lines will be read from the command's standard output.
Example:
UI OPTIONS
These options are configured in the [ui] section of aerc.conf.
index-columns = <column1,column2,column3...>
Default: flags:4,name<20%,subject,date>=
column-separator = "<separator>"
Default: " "
column-<name> = <go template>
By default, these columns are defined:
column-flags = {{.Flags | join ""}} column-name = {{index (.From | names) 0}} column-subject = {{.ThreadPrefix}}{{.Subject}} column-date = {{.DateAutoFormat .Date.Local}}
See aerc-templates(7) for all available symbols and functions.
timestamp-format = <timeformat>
Default: 2006 Jan 02
this-day-time-format = <timeformat>
Default: 15:04
this-week-time-format = <timeformat>
Default: Jan 02
this-year-time-format = <timeformat>
Default: Jan 02
message-view-timestamp-format = <timeformat>
Default: 2006 Jan 02, 15:04 GMT-0700
message-view-this-day-time-format = <timeformat>
message-view-this-week-time-format = <timeformat>
message-view-this-year-time-format = <timeformat>
sidebar-width = <int>
Default: 22
message-list-split = [<direction>] <size>
<direction> is optional and defaults to horizontal. It can take one of the following values: h, horiz, horizontal, v, vert, vertical.
<size> is a positive integer representing the size (in terminal cells) of the message list window.
See :split in aerc(1) for more details.
empty-message = <string>
Default: (no messages)
empty-dirlist = <string>
Default: (no folders)
empty-subject = <string>
Default: (no subject)
mouse-enabled = true|false
Default: false
new-message-bell = true|false
Default: true
tab-title-account = <go_template>
Default: {{.Account}}
tab-title-composer = <go_template>
Default: {{if .To}}to:{{index (.To | shortmboxes) 0}} {{end}}{{.SubjectBase}}
tab-title-viewer = <go_template>
Default: {{.Subject}}
pinned-tab-marker = "<string>"
Default: `
spinner = "<string>"
Examples:
- spinner = "-_-,_-_"
- spinner = '. , .'
- spinner = ",|,/,-"
Default: "[..] , [..] , [..] , [..] , [..], [..] , [..] , [..] "
spinner-delimiter = <string>
Default: ,
spinner-interval = <duration>
Default: 200ms
sort = <criteria>
Example:
dirlist-left = <go template>
Default: {{.Folder}}
dirlist-right = <go template>
Default: {{if .Unread}}{{humanReadable .Unread}}{{end}}
dirlist-delay = <duration>
Default: 200ms
dirlist-tree = true|false
Default: false
dirlist-collapse = <int>
Default: 0
next-message-on-delete = true|false
Default: true
auto-mark-read = true|false
Default: true
completion-popovers = true|false
Default: true
completion-delay = <duration>
Default: 250ms
completion-min-chars = <int>
Setting this to manual disables automatic completion, leaving only the manually triggered completion with the $complete key (see aerc-binds(5) for more details).
Default: 1
border-char-vertical = "<char>"
border-char-horizontal = "<char>"
Default: " "
stylesets-dirs = <path1:path2:path3...>
${XDG_CONFIG_HOME:-~/.config}/aerc/stylesets ${XDG_DATA_HOME:-~/.local/share}/aerc/stylesets /usr/local/share/aerc/stylesets /usr/share/aerc/stylesets
styleset-name = <string>
Default: default
Have a look at aerc-stylesets(7) as to how a styleset looks like.
icon-unencrypted = <string>
icon-encrypted = <string>
Default: [e]
icon-signed = <string>
Default: [s]
icon-signed-encrypted = <string>
icon-unknown = <string>
Default: [s?]
icon-invalid = <string>
Default: [s!]
icon-attachment = <string>
Default: a
icon-new = <string>
Default: N
icon-old = <string>
Default: O
icon-replied = <string>
Default: r
icon-flagged = <string>
Default: !
icon-marked = <string>
Default: *
icon-draft = <string>
Default: d
icon-deleted = <string>
Default: X
fuzzy-complete = true|false
reverse-msglist-order = true|false
Default: false
reverse-thread-order = true|false
Default: false
select-last-message = true|false
Default: false
sort-thread-siblings = true|false
Default: false
threading-enabled = true|false
Default: false
force-client-threads = true|false
Default: false
threading-by-subject = true|false
Default: false
client-threads-delay = <duration>
Default: 50ms
show-thread-context = true|false
Default: false
msglist-scroll-offset = <int>
Default: 0
dialog-position = top|center|bottom
Default: center
dialog-width = <width>
Default: 50
dialog-height = <height>
Default: 50
THREAD PREFIX CUSTOMIZATION
You can fully customize the thread arrows appearance, which is defined by the following configurable prefix parts:
thread-prefix-tip = <string>
Default: ">"
thread-prefix-indent = <string>
Default: " "
thread-prefix-stem = <string>
Default: "│"
thread-prefix-limb = <string>
Default: ""
thread-prefix-folded = <string>
Default: "+"
thread-prefix-unfolded = <string>
Default: ""
thread-prefix-first-child = <string>
Default: ""
thread-prefix-has-siblings = <string>
Default: ├─
thread-prefix-lone = <string>
Default: ""
thread-prefix-orphan = <string>
Default: ""
thread-prefix-last-sibling = <string>
Default: └─
thread-prefix-last-sibling-reverse = <string>
Default: ┌─
thread-prefix-dummy = <string>
Default: ┬─
thread-prefix-dummy-reverse = <string>
Default: ┴─
thread-prefix-first-child-reverse = <string>
Default: ""
thread-prefix-orphan-reverse = <string>
Default: ""
Default settings (mutt-style):
[PATCH aerc v5] ui: allow thread arrow customisation ├─>[aerc/patches] build success ├─>Re: [PATCH aerc v5] ui: allow thread arrow customisation ├─+ └─> ├─> │ ├─> │ └─> │ └─> └─>
More compact, rounded threads that are also fold-aware:
┌[PATCH aerc v5] ui: allow thread arrow customisation ├─[aerc/patches] build success ├─Re: [PATCH aerc v5] ui: allow thread arrow customisation ├+ ╰┬ ├┬ │├─ │╰┬ │ ╰─ ╰─
thread-prefix-tip = "" thread-prefix-indent = "" thread-prefix-stem = "│" thread-prefix-limb = "─" thread-prefix-folded = "+" thread-prefix-unfolded = "" thread-prefix-first-child = "┬" thread-prefix-has-siblings = "├" thread-prefix-orphan = "┌" thread-prefix-dummy = "┬" thread-prefix-lone = " " thread-prefix-last-sibling = "╰"
CONTEXTUAL UI CONFIGURATION
The UI configuration can be specialized for accounts, specific mail directories and message subjects. The specializations are added using contextual config sections based on the context.
The contextual UI configuration is merged to the base UiConfig in the following order: Base UIConfig > Account Context > Folder Context.
[ui:account=AccountName]
[ui:folder=FolderName]
[ui:folder~Regex]
Example:
[ui:account=Work] sidebar-width=... [ui:folder=Sent] index-format=... [ui:folder~Archive/d+/.*] index-format=...
STATUSLINE
These options are configured in the [statusline] section of aerc.conf.
status-columns = <column1,column2,column3...>
To completely mute the statusline (except for push notifications), explicitly set status-columns to an empty string:
Default: left<*,center>=,right>*
column-separator = "<separator>"
Default: " "
column-<name> = <go template>
By default, these columns are defined:
column-left = [{{.Account}}] {{.StatusInfo}} column-center = {{.PendingKeys}} column-right = {{.TrayInfo}} | {{cwd}}
See aerc-templates(7) for all available symbols and functions.
separator = "<string>"
Default: " | "
display-mode = text|icon
Default: text
VIEWER
These options are configured in the [viewer] section of aerc.conf.
pager = <command>
Default: less -Rc
alternatives = <mime,types>
Default: text/plain,text/html
header-layout = <header|layout,list...>
Notmuch tags can be displayed by adding Labels.
Authentication information from the Authentication-Results header can be displayed by adding DKIM, SPF or DMARC. To show more information than just the authentication result, append a plus sign (+) to the header name (e.g. DKIM+).
Default: From|To,Cc|Bcc,Date,Subject
show-headers = true|false
Default: false
always-show-mime = true|false
Default: false
max-mime-height = height
Default: 0
parse-http-links = true|false
Default: true
COMPOSE
These options are configured in the [compose] section of aerc.conf.
editor = <command>
The following variables are defined in the editor's environment:
AERC_ACCOUNT
Defaults to $EDITOR, or vi(1).
header-layout = <header|layout,list...>
Default: To|From,Subject
edit-headers = true|false
When this is set to true, the :cc, :bcc and :header commands do not work, editing email headers are left to the text editor. address-book-cmd is not supported and address completion is left to the editor itself. header-layout is ignored.
Default: false
address-book-cmd = <command>
The command must output the completions to standard output, one completion per line. Each line must be tab-delimited, with an email address occurring as the first field. Only the email address field is required. The second field, if present, will be treated as the contact name. Additional fields are ignored.
This parameter can also be set per account in accounts.conf.
Example with carddav-query(1):
Example with khard(1):
file-picker-cmd = <command>
If %f is not present, the command must output the selected files to standard output, one file per line. If it is present, then aerc does not capture the standard output and instead reads the files from the temporary file which should have the same format.
Examples:
reply-to-self = true|false
Default: true
empty-subject-warning = true|false
Default: false
no-attachment-warning = <regexp>
Uses Go's regexp syntax, documented at https://golang.org/s/re2syntax. The (?im) flags are set by default (case-insensitive and multi-line).
Example:
format-flowed = true|false
Default: false
lf-editor = true|false
Default: false
MULTIPART CONVERTERS
Converters allow generating multipart/alternative messages by converting the main text/plain body into any other text MIME type with the :multipart command. Only exact MIME types are accepted. The commands are invoked with sh -c and are expected to output valid UTF-8 text.
Only text/<subtype> MIME parts can be generated. The text/plain MIME type is reserved and cannot be generated. You still need to write your emails by hand in your favorite text editor.
Converters are configured in the [multipart-converters] section of aerc.conf.
Example:
[multipart-converters] text/html=pandoc -f markdown -t html --standalone
Obviously, this requires that you write your main text/plain body using the markdown syntax. Also, mind that some mailing lists reject emails that contain text/html alternative parts. Use this feature carefully and when possible, avoid using it at all.
FILTERS
Filters are a flexible and powerful way of handling viewing parts of an opened message. When viewing messages aerc will show the list of available message parts and their MIME type at the bottom, but unless a filter is defined for a specific MIME type, it will only show a menu with a few options (allowing you to open the part in an external program, save it to disk or pipe it to a shell command). Configuring a filter will allow viewing the output of the filter in the configured pager in aerc's built-in terminal.
Filters are configured in the [filters] section of aerc.conf. The first filter which matches the part's MIME type will be used, so order them from most to least specific. You can also match on non-MIME types, by prefixing with the header to match against (non-case-sensitive) and a comma, e.g. subject,text will match a subject which contains text. Use header,~regex to match against a regex. Using .filename instead of a header will match against the filename of an attachment.
Note that aerc will pipe the content into the configured filter program, so filters need to be able to read from standard input. Many programs support reading from stdin by putting - instead of a path to a file. You can also chain together multiple filters by piping with |.
aerc ships with some default filters installed in the libexec directory (usually /usr/libexec/aerc/filters). Note that these may have additional dependencies that aerc does not have alone.
The filter commands are invoked with sh -c command. The following folders are prepended to the system $PATH to allow referencing filters from their name only.
${XDG_CONFIG_HOME:-~/.config}/aerc/filters ~/.local/libexec/aerc/filters ${XDG_DATA_HOME:-~/.local/share}/aerc/filters $PREFIX/libexec/aerc/filters $PREFIX/share/aerc/filters /usr/libexec/aerc/filters /usr/share/aerc/filters
If you want to run a program in your default $PATH which has the same name as a builtin filter (e.g. /usr/bin/colorize), use its absolute path.
The following variables are defined in the filter command environment:
AERC_MIME_TYPE
Note that said email body is converted into UTF-8 before being passed to filters.
If show-headers is enabled, only the currently viewed part body is piped into the filter command. A special .headers filter command can be defined to post process the full headers.
EXAMPLES
text/plain
text/plain=colorize
The built-in colorize filter can be configured in the [viewer] section of styleset files. See aerc-stylesets(7).
Wrap long lines at 100 characters, while not messing up nested quotes. Handles format=flowed emails properly:
text/plain=wrap -w 100 | colorize
from,<sender>
from,thatguywhoneverhardwrapshismessages=wrap -r -w 72 | colorize
subject,~<regexp>
subject,~Git(hub|lab)=lolcat -f
text/html
text/html=html | colorize
Use pandoc to output plain text:
text/html=pandoc -f html -t plain
text/calendar
text/calendar=calendar
text/*
text/*=bat -fP --file-name="$AERC_FILENAME" --style=plain
.headers
.headers=colorize
message/delivery-status
message/delivery-status=colorize
message/rfc822
message/rfc822=caeml | colorize
application/mbox
application/mbox=catbox -c caeml | colorize
application/pdf
application/pdf=pdftotext - -l 10 -nopgbrk -q - | fmt -w 100
image/*
You can still set a specific filter, e.g catimg(1):
image/*=catimg -w$(tput cols) -
.filename,~<regexp>
.filename,~.*.csv=column -t --separator=","
See the wiki at https://man.sr.ht/~rjarry/aerc/ for more examples and possible customizations of the built-in filters.
OPENERS
Openers allow you to specify the command to use for the :open and :open-link actions on a per-MIME-type basis. The :open-link URL scheme is used to determine the MIME type as follows: x-scheme-handler/<scheme>. They are configured in the [openers] section of aerc.conf.
{} is expanded as the temporary filename or URL to be opened with proper shell quoting. If it is not encountered in the command, the filename/URL will be appended to the end of the command. The command will then be executed with sh -c.
Like [filters], openers support basic shell globbing. The first opener which matches the part's MIME type (or URL scheme handler MIME type) will be used, so order them from most to least specific.
Example:
[openers] x-scheme-handler/irc=hexchat x-scheme-handler/http*=printf '%s' {} | wl-copy text/html=surf -dfgms text/plain=gvim {} +125 message/rfc822=thunderbird
HOOKS
Hooks are triggered whenever the associated event occurs. The commands are run in a shell environment with information added to environment variables.
They are configured in the [hooks] section of aerc.conf.
aerc-startup = <command>
Variables:
- AERC_VERSION
- AERC_BINARY
Example:
mail-received = <command>
Variables:
- AERC_ACCOUNT
- AERC_ACCOUNT_BACKEND
- AERC_FOLDER
- AERC_FOLDER_ROLE
- AERC_FROM_NAME
- AERC_FROM_ADDRESS
- AERC_SUBJECT
- AERC_MESSAGE_ID
Example:
mail-deleted = <command>
Variables:
- AERC_ACCOUNT
- AERC_ACCOUNT_BACKEND
- AERC_FOLDER
- AERC_FOLDER_ROLE
Example:
mail-added = <command>
Variables:
- AERC_ACCOUNT
- AERC_ACCOUNT_BACKEND
- AERC_FOLDER
- AERC_FOLDER_ROLE
Example:
mail-sent = <command>
Variables:
- AERC_ACCOUNT
- AERC_ACCOUNT_BACKEND
- AERC_FROM_NAME
- AERC_FROM_ADDRESS
- AERC_SUBJECT
- AERC_TO
- AERC_CC
Example:
aerc-shutdown = <command>
Variables:
- •
- AERC_LIFETIME
tag-modified = <command>
Variables:
- AERC_ACCOUNT
- AERC_ACCOUNT_BACKEND
- AERC_TAG_ADDED
- AERC_TAG_REMOVED
flag-changed = <command>
Variables:
- AERC_ACCOUNT
- AERC_ACCOUNT_BACKEND
- AERC_FOLDER
- AERC_FOLDER_ROLE
- AERC_FLAG
Example:
TEMPLATES
Template files are used to populate the body of an email. The :compose, :reply and :forward commands can be called with the -T flag with the name of the template name. The available symbols and functions are described in aerc-templates(7).
aerc ships with some default templates installed in the share directory (usually /usr/share/aerc/templates).
These options are configured in the [templates] section of aerc.conf.
template-dirs = <path1:path2:path3...>
${XDG_CONFIG_HOME:-~/.config}/aerc/templates ${XDG_DATA_HOME:-~/.local/share}/aerc/templates /usr/local/share/aerc/templates /usr/share/aerc/templates
new-message = <template_name>
Default: new_message
quoted-reply = <template_name>
Default: quoted_reply
forwards = <template_name>
Default: forward_as_body
SEE ALSO
aerc(1) aerc-accounts(5) aerc-binds(5) aerc-imap(5) aerc-jmap(5) aerc-maildir(5) aerc-notmuch(5) aerc-templates(7) aerc-sendmail(5) aerc-smtp(5) aerc-stylesets(7) carddav-query(1)
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/.
2024-07-30 |