Provided by: aerc_0.14.0-1_amd64
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. 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> Used as a default path for save operations if no other path is specified. pgp-provider = auto|gpg|internal If set to gpg, aerc will use system gpg binary and keystore for all crypto operations. If set to internal, the internal openpgp keyring will be used. If set to auto, the system gpg will be preferred unless the internal keyring already exists, in which case the latter will be used. Default: auto unsafe-accounts-conf = true|false By default, the file permissions of accounts.conf must be restrictive and only allow reading by the file owner (0600). Set this option to true to ignore this permission check. Use this with care as it may expose your credentials. Default: false log-file = <path> Output log messages to specified file. A path starting with ~/ is expanded to the user home dir. When redirecting aerc's output to a file using > shell redirection, this setting is ignored and log messages are printed to stdout. log-level = trace|debug|info|warn|error Only log messages above the specified level to log-file. Supported levels are: trace, debug, info, warn and error. When redirecting aerc's output to a file using > shell redirection, this setting is ignored and the log level is forced to trace. Default: info
UI OPTIONS
These options are configured in the [ui] section of aerc.conf. index-format = <format> Describes the format for each row in a mailbox view. This field is compatible with mutt's printf-like syntax. Default: %D %-17.17n %s ┌─────────────────┬──────────────────────────────────┐ │Format specifier │ Description │ ├─────────────────┼──────────────────────────────────┤ │ %% │ literal % │ ├─────────────────┼──────────────────────────────────┤ │ %a │ sender address │ ├─────────────────┼──────────────────────────────────┤ │ %A │ reply-to address, or sender │ │ │ address if none │ ├─────────────────┼──────────────────────────────────┤ │ %C │ message number │ ├─────────────────┼──────────────────────────────────┤ │ %d │ formatted message timestamp │ ├─────────────────┼──────────────────────────────────┤ │ %D │ formatted message timestamp │ │ │ converted to local timezone │ ├─────────────────┼──────────────────────────────────┤ │ %f │ sender name and address │ ├─────────────────┼──────────────────────────────────┤ │ %F │ author name, or recipient name │ │ │ if the message is from you. The │ │ │ address is shown if no name │ │ │ part. │ ├─────────────────┼──────────────────────────────────┤ │ %g │ message labels (for example │ │ │ notmuch tags) │ ├─────────────────┼──────────────────────────────────┤ │ %i │ message id │ ├─────────────────┼──────────────────────────────────┤ │ %n │ sender name, or sender address │ │ │ if none │ ├─────────────────┼──────────────────────────────────┤ │ %r │ comma-separated list of │ │ │ formatted recipient names and │ │ │ addresses │ ├─────────────────┼──────────────────────────────────┤ │ %R │ comma-separated list of │ │ │ formatted CC names and addresses │ ├─────────────────┼──────────────────────────────────┤ │ %s │ subject │ ├─────────────────┼──────────────────────────────────┤ │ %t │ the (first) address the new │ │ │ email was sent to │ ├─────────────────┼──────────────────────────────────┤ │ %T │ the account name which received │ │ │ the email │ ├─────────────────┼──────────────────────────────────┤ │ %u │ sender mailbox name (e.g. │ │ │ "smith" in "smith@example.net") │ ├─────────────────┼──────────────────────────────────┤ │ %v │ sender first name (e.g. "Alex" │ │ │ in "Alex Smith │ │ │ <smith@example.net>") │ ├─────────────────┼──────────────────────────────────┤ │ %Z │ flags (O=old, N=new, r=answered, │ │ │ D=deleted, !=flagged, *=marked, │ │ │ a=attachment) │ └─────────────────┴──────────────────────────────────┘ timestamp-format = <timeformat> See time.Time#Format at https://godoc.org/time#Time.Format Default: 2006-01-02 03:04 PM (ISO 8601 + 12 hour time) this-day-time-format = <timeformat> Index-only time format for messages that were received/sent today. If this is not specified, timestamp-format is used instead. this-week-time-format = <timeformat> Index-only time format for messages that were received/sent within the last 7 days. If this is not specified, timestamp-format is used instead. this-year-time-format = <timeformat> Index-only time format for messages that were received/sent this year. If this is not specified, timestamp-format is used instead. message-view-timestamp-format = <timeformat> If set, overrides timestamp-format for the message view. message-view-this-day-time-format = <timeformat> If set, overrides timestamp-format in the message view for messages that were received/sent today. message-view-this-week-time-format = <timeformat> If set, overrides timestamp-format in the message view for messages that were recieved/sent within the last 7 days. message-view-this-year-time-format = <timeformat> If set, overrides timestamp-format in the message view for messages that were received/sent this year. sidebar-width = <int> Width of the sidebar, including the border. Set to zero to disable the sidebar. Default: 20 empty-message = <string> Message to display when viewing an empty folder. Default: (no messages) empty-dirlist = <string> Message to display when no folders exists or are all filtered. Default: (no folders) mouse-enabled = true|false Enable mouse events in the ui, e.g. clicking and scrolling with the mousewheel Default: false new-message-bell = true|false Ring the bell when a new message is received. Default: true pinned-tab-marker = "<string>" Marker to show before a pinned tab's name. Default: ` spinner = "<string>" Animation shown while loading, split by spinner-delimiter (below) Examples: • spinner = "-_-,_-_" • spinner = '. , .' • spinner = ",|,/,-" Default: "[..] , [..] , [..] , [..] , [..], [..] , [..] , [..] " spinner-delimiter = <string> Spinner delimiter to split string into an animation Default: , sort = <criteria> List of space-separated criteria to sort the messages by, see :sort command in aerc(1) for reference. Prefixing a criterion with -r reverses that criterion. Example: sort = from -r date dirlist-format = <format> Describes the format string to use for the directory list. Default: %n %>r ┌─────────────────┬──────────────────────────────┐ │Format specifier │ Description │ ├─────────────────┼──────────────────────────────┤ │ %% │ literal % │ ├─────────────────┼──────────────────────────────┤ │ %n │ directory name │ ├─────────────────┼──────────────────────────────┤ │ %N │ compacted directory name │ ├─────────────────┼──────────────────────────────┤ │ %r │ recent/unseen/total message │ │ │ count │ ├─────────────────┼──────────────────────────────┤ │ %>X │ make format specifier 'X' be │ │ │ right justified │ └─────────────────┴──────────────────────────────┘ dirlist-delay = <duration> Delay after which the messages are actually listed when entering a directory. This avoids loading messages when skipping over folders and makes the UI more responsive. If you do not want that, set it to 0s. Default: 200ms dirlist-tree = true|false Display the directory list as a foldable tree. Default: false dirlist-collapse = <int> If dirlist-tree is enabled, set level at which folders are collapsed by default. Set to 0 to disable. Default: 0 next-message-on-delete = true|false Moves to next message when the current message is deleted, archived, or moved. Default: true auto-mark-read = true|false Set the seen flag when a message is opened in the message viewer. Default: true completion-popovers = true|false Shows potential auto-completions for text inputs in popovers. Default: true completion-delay = <duration> How long to wait after the last input before auto-completion is triggered. Default: 250ms completion-min-chars = <int> The minimum required characters to allow auto-completion to be triggered after completion-delay. Default: 1 border-char-vertical = "<char>" border-char-horizontal = "<char>" Set stylable characters (via the border element) for vertical and horizontal borders. Default: " " stylesets-dirs = <path1:path2:path3...> The directories where the stylesets are stored. The config takes a colon-separated list of dirs. If this is unset or if a styleset cannot be found, the following paths will be used as a fallback in that order: ${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> The name of the styleset to be used to style the ui elements. The stylesets are stored in the stylesets directory in the config directory. Default: default Have a look at aerc-stylesets(7) as to how a styleset looks like. icon-unencrypted = <string> The icon to display for unencrypted mails. The status indicator is only displayed if an icon is set. icon-encrypted = <string> The icon to display for encrypted mails. Default: [e] icon-signed = <string> The icon to display for signed mails where the signature was successfully validated. Default: [s] icon-signed-encrypted = <string> The icon to display for signed and encrypted mails where the signature was successfully verified. The combined icon is only used if set, otherwise the signed and encrypted icons are displayed separately. icon-unknown = <string> The icon to display for signed mails which could not be verified due to the key being unknown. Default: [s?] icon-invalid = <string> The icon to display for signed mails where verification failed. Default: [s!] icon-attachment = <string> The icon to display index-format when the message has an attachment. Default: a fuzzy-complete = true|false When typing a command or option, the popover will now show not only the items /starting/ with the string input by the user, but it will also show instances of items /containing/ the string, starting at any position and need not be consecutive characters in the command or option. reverse-msglist-order = true|false Reverses the order of the message list. By default, the message list is ordered with the newest (highest UID) message on top. Reversing the order will put the oldest (lowest UID) message on top. This can be useful in cases where the backend does not support sorting. Default: false reverse-thread-order = true|false Reverse display of the message threads. By default, the thread root is displayed at the top of the tree with all replies below. The reverse option will put the thread root at the bottom with replies on top. Default: false sort-thread-siblings = true|false Sort the thread siblings according to the sort criteria for the messages. If sort- thread-siblings is false, the thread siblings will be sorted based on the message UID. This option is only applicable for client-side threading with a backend that enables sorting. Default: false threading-enabled = true|false Enable a threaded view of messages. If this is not supported by the backend (IMAP server or notmuch), threads will be built by the client. Default: false force-client-threads = true|false Force threads to be built client-side. Backends that don't support threading will always build threads client side. Default: false 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 > Subject Context. [ui:account=AccountName] Adds account specific configuration with the account name. [ui:folder=FolderName] Add folder specific configuration with the folder name. [ui:folder~Regex] Add folder specific configuration for folders whose names match the regular expression. [ui:subject~Regex] Add specialized ui configuration for messages that match a given regular expression. Example: [ui:account=Work] sidebar-width=... [ui:folder=Sent] index-format=... [ui:folder~Archive/d+/.*] index-format=... [ui:subject~^[PATCH] index-format=...
STATUSLINE
These options are configured in the [statusline] section of aerc.conf. render-format = <format> Describes the format string for the statusline format. For a minimal statusline that only shows the current account and the connection information, use [%a] %c. To completely mute the statusline (except for push notifications), use %m only. Default: [%a] %S %>%T ┌─────────────────┬──────────────────────────────────┐ │Format specifier │ Description │ ├─────────────────┼──────────────────────────────────┤ │ %% │ literal % │ ├─────────────────┼──────────────────────────────────┤ │ %a │ active account name │ ├─────────────────┼──────────────────────────────────┤ │ %d │ active directory name │ ├─────────────────┼──────────────────────────────────┤ │ %c │ connection state │ ├─────────────────┼──────────────────────────────────┤ │ %p │ current path │ ├─────────────────┼──────────────────────────────────┤ │ %m │ mute statusline and show only │ │ │ push notifications │ ├─────────────────┼──────────────────────────────────┤ │ %S │ general status information (e.g. │ │ │ connection state, filter, │ │ │ search) │ ├─────────────────┼──────────────────────────────────┤ │ %T │ general on/off information (e.g. │ │ │ passthrough, threading, sorting) │ ├─────────────────┼──────────────────────────────────┤ │ %> │ does not print anything but all │ │ │ format specifier that follow │ │ │ will be right justified. │ └─────────────────┴──────────────────────────────────┘ separator = "<string>" Specifies the separator between grouped statusline elements (e.g. for the %S and %T specifiers in render-format). Default: " | " display-mode = text|icon Defines the mode for displaying the status elements. Default: text
VIEWER
These options are configured in the [viewer] section of aerc.conf. pager = <command> Specifies the pager to use when displaying emails. Note that some filters may add ANSI escape sequences to add color to rendered emails, so you may want to use a pager which supports ANSI. Default: less -R alternatives = <mime,types> If an email offers several versions (multipart), you can configure which mimetype to prefer. For example, this can be used to prefer plaintext over HTML emails. Default: text/plain,text/html header-layout = <header|layout,list...> Defines the default headers to display when viewing a message. To display multiple headers in the same row, separate them with a pipe, e.g. From|To. Rows will be hidden if none of their specified headers are present in the message. 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 setting to determine whether to show full headers or only parsed ones in message viewer. Default: false always-show-mime = true|false Whether to always show the mimetype of an email, even when it is just a single part. Default: false parse-http-links = true|false Parses and extracts http links when viewing a message. Links can then be accessed with the open-link command. Default: true
COMPOSE
These options are configured in the [compose] section of aerc.conf. editor = <command> Specifies the command to run the editor with. It will be shown in an embedded terminal, though it may also launch a graphical window if the environment supports it. Defaults to $EDITOR, or vi(1). header-layout = <header|layout,list...> Defines the default headers to display when composing a message. To display multiple headers in the same row, separate them with a pipe, e.g. To|From. Default: To|From,Subject address-book-cmd = <command> Specifies the command to be used to tab-complete email addresses. Any occurrence of %s in the address-book-cmd will be replaced with anything the user has typed after the last comma. 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: address-book-cmd = khard email --remove-first-line --parsable %s file-picker-cmd = <command> Specifies the command to be used to select attachments. Any occurence of %s in the file-picker-cmd will be replaced with the argument <arg> to :attach -m <arg>. The command must output the selected files to standard output, one file per line. Example: file-picker-cmd = fzf --multi --query=%s reply-to-self = true|false If set to false, do not mail yourself when replying (e.g., if replying to emails previously sent by yourself, address your replies to the original To and Cc). Default: true no-attachment-warning = <regexp> Specifies a regular expression against which an email's body should be tested before sending an email with no attachment. If the regexp matches, aerc will warn you before sending the message. Leave empty to disable this feature. 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: no-attachment-warning = ^[^>]*attach(ed|ment)
MULTIPART CONVERTERS
Converters allow to generate 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. 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 share directory (usually /usr/share/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 appended to the system $PATH to allow referencing filters from their name only. ${XDG_CONFIG_HOME:-~/.config}/aerc/filters ${XDG_DATA_HOME:-~/.local/share}/aerc/filters $PREFIX/share/aerc/filters /usr/share/aerc/filters The following variables are defined in the filter command environment: AERC_MIME_TYPE the part MIME type/subtype AERC_FORMAT the part content type format= parameter (e.g. format=flowed) AERC_FILENAME the attachment filename (if any) AERC_SUBJECT the message Subject header value AERC_FROM the message From header value Note that said email body is converted into UTF-8 before being passed to filters. EXAMPLES text/plain Color some things, e.g. quotes, git diffs, links, etc.: text/plain=colorize The built-in colorize filter supports alternative themes: text/plain=colorize -v theme=solarized 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> Another example of hard wrapping lines of emails sent by a specific person. Explicitly reflow all paragraphs instead of only wrapping long lines. This may break manual formatting in some messages: from,thatguywhoneverhardwrapshismessages=wrap -r -w 72 | colorize subject,~<regexp> Use rainbow coloring with lolcat(1) for emails sent by software forges: subject,~Git(hub|lab)=lolcat -f text/html Render html to a more human readable version and colorize: text/html=html | colorize Use pandoc to output plain text: text/html=pandoc -f html -t plain text/calendar Parse calendar invites: text/calendar=calendar text/* Catch any other type of text that did not have a specific filter and use bat(1) to color these: text/*=bat -fP --file-name="$AERC_FILENAME" --style=plain message/delivery-status When not being able to deliver the provider might send such emails: message/delivery-status=colorize message/rfc822 When getting emails as attachments, e.g. on some mailing lists digest format is sending an email with all the digest emails as attachments. Requires caeml(1) to be on PATH: message/rfc822=caeml | colorize https://github.com/ferdinandyb/caeml application/mbox Emails as attachments in the mbox format. For example aerc can also create an mbox from messages with the :pipe command. Requires catbox(1) and caeml(1) to be on PATH: application/mbox=catbox -c caeml | colorize https://github.com/konimarti/catbox application/pdf Render pdf to text and rewrap at 100 character width. Requires pdftotext(1) to be on PATH: application/pdf=pdftotext - -l 10 -nopgbrk -q - | fmt -w 100 https://www.xpdfreader.com/pdftotext-man.html image/* This is a tricky topic. It's possible to display images in a terminal, but for high resolution images the terminal you are using either needs to support sixels or the kitty terminal graphics protocol. Unfortunately, aerc's built-in terminal supports neither, so only highly pixelated images can be shown natively. A workaround is possible by asking the terminal to draw on top of aerc and then remove the image when done viewing. The built-in terminal can show pixelated images with catimg(1): image/*=catimg -w$(tput cols) - See the wiki at https://man.sr.ht/~rjarry/aerc/ for more examples and possible customizations of the built-in filters (e.g. colors of colorize).
OPENERS
Openers allow you to specify the command to use for the :open action on a per-MIME-type basis. They are configured in the [openers] section of aerc.conf. {} is expanded as the temporary filename to be opened. If it is not encountered in the command, the temporary filename will be appened to the end of the command. Environment variables are also expanded. Tilde is not expanded. Example: [openers] text/html=surf -dfgms text/plain=gvim {} +125 message/rfc822=thunderbird
TRIGGERS
Triggers specify commands to execute when certain events occur. They are configured in the [triggers] section of aerc.conf. new-email = <command> Executed when a new email arrives in the selected folder. e.g. new-email=exec notify-send "New email from %n" "%s" Format specifiers from index-format are expanded with respect to the new message.
TEMPLATES
Templates 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. 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...> The directory where the templates are stored. The config takes a colon-separated list of dirs. If this is unset or if a template cannot be found, the following paths will be used as a fallback in that order: ${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> The default template to be used for new messages. Default: new_message quoted-reply = <template_name> The default template to be used for quoted replies. Default: quoted_reply forwards = <template_name> The default template to be used for forward as body. Default: forward_as_body
SEE ALSO
aerc(1) aerc-accounts(5) aerc-binds(5) aerc-imap(5) aerc-maildir(5) aerc-notmuch(5) aerc- templates(7) aerc-sendmail(5) aerc-smtp(5) aerc-stylesets(7)
AUTHORS
Originally created by Drew DeVault <sir@cmpwn.com> and maintained by Robin Jarry <robin@jarry.cc> who is assisted by other open source contributors. For more information about aerc development, see https://sr.ht/~rjarry/aerc/. 2023-01-06 AERC-CONFIG(5)