.\" Generated by scdoc 1.11.2 .\" Complete documentation for this program is not available as a GNU info page .ie \n(.g .ds Aq \(aq .el .ds Aq ' .nh .ad l .\" Begin generated content: .TH "AERC-CONFIG" "5" "2023-04-23" .P .SH NAME .P aerc-config - configuration file format for \fBaerc\fR(1) .P .SH SYNOPSIS .P There are three aerc config files: \fIaerc.\&conf\fR, \fIbinds.\&conf\fR, and \fIaccounts.\&conf\fR.\& 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 \fIaerc\fR, which defaults to \fI~/.\&config/aerc\fR.\& .P Examples of these config files are typically included with your installation of aerc and are usually installed in \fI/usr/share/aerc\fR.\& .P Each file uses the ini format, and consists of sections with keys and values.\& A line beginning with \fI#\fR is considered a comment and ignored, as are empty lines.\& New sections begin with \fI[section-name]\fR on a single line, and keys and values are separated with \fI=\fR.\& .P This manual page focuses on \fIaerc.\&conf\fR.\& \fIbinds.\&conf\fR is detailed in \fBaerc-binds\fR(5) and \fIaccounts.\&conf\fR in \fBaerc-accounts\fR(5).\& .P \fIaerc.\&conf\fR is used for configuring the general appearance and behavior of aerc.\& .P .SH GENERAL OPTIONS .P These options are configured in the \fB[general]\fR section of \fIaerc.\&conf\fR.\& .P \fBdefault-save-path\fR = \fI\fR .RS 4 Used as a default path for save operations if no other path is specified.\& .P .RE \fBpgp-provider\fR = \fIauto\fR|\fIgpg\fR|\fIinternal\fR .RS 4 If set to \fIgpg\fR, aerc will use system gpg binary and keystore for all crypto operations.\& If set to \fIinternal\fR, the internal openpgp keyring will be used.\& If set to \fIauto\fR, the system gpg will be preferred unless the internal keyring already exists, in which case the latter will be used.\& .P Default: \fIauto\fR .P .RE \fBunsafe-accounts-conf\fR = \fItrue\fR|\fIfalse\fR .RS 4 By default, the file permissions of \fIaccounts.\&conf\fR must be restrictive and only allow reading by the file owner (\fI0600\fR).\& Set this option to \fItrue\fR to ignore this permission check.\& Use this with care as it may expose your credentials.\& .P Default: \fIfalse\fR .P .RE \fBlog-file\fR = \fI\fR .RS 4 Output log messages to specified file.\& A path starting with \fI~/\fR is expanded to the user home dir.\& When redirecting aerc'\&s output to a file using \fI>\fR shell redirection, this setting is ignored and log messages are printed to stdout.\& .P .RE \fBlog-level\fR = \fItrace\fR|\fIdebug\fR|\fIinfo\fR|\fIwarn\fR|\fIerror\fR .RS 4 Only log messages above the specified level to \fBlog-file\fR.\& Supported levels are: \fItrace\fR, \fIdebug\fR, \fIinfo\fR, \fIwarn\fR and \fIerror\fR.\& When redirecting aerc'\&s output to a file using \fI>\fR shell redirection, this setting is ignored and the log level is forced to \fItrace\fR.\& .P Default: \fIinfo\fR .P .RE .SH UI OPTIONS .P These options are configured in the \fB[ui]\fR section of \fIaerc.\&conf\fR.\& .P \fBindex-format\fR = \fI\fR .RS 4 Describes the format for each row in a mailbox view.\& This field is compatible with mutt'\&s printf-like syntax.\& .P Default: \fI%D %-17.\&17n %s\fR .P .RE .TS allbox;c l c l c l c l c l c l c l c l c l c l c l c l c l c l c l c l c l c l c l c l. T{ \fBFormat specifier\fR T} T{ \fBDescription\fR T} T{ \fI%%\fR T} T{ literal % T} T{ \fI%a\fR T} T{ sender address T} T{ \fI%A\fR T} T{ reply-to address, or sender address if none T} T{ \fI%C\fR T} T{ message number T} T{ \fI%d\fR T} T{ formatted message timestamp T} T{ \fI%D\fR T} T{ formatted message timestamp converted to local timezone T} T{ \fI%f\fR T} T{ sender name and address T} T{ \fI%F\fR T} T{ author name, or recipient name if the message is from you.\& The address is shown if no name part.\& T} T{ \fI%g\fR T} T{ message labels (for example notmuch tags) T} T{ \fI%i\fR T} T{ message id T} T{ \fI%n\fR T} T{ sender name, or sender address if none T} T{ \fI%r\fR T} T{ comma-separated list of formatted recipient names and addresses T} T{ \fI%R\fR T} T{ comma-separated list of formatted CC names and addresses T} T{ \fI%s\fR T} T{ subject T} T{ \fI%t\fR T} T{ the (first) address the new email was sent to T} T{ \fI%T\fR T} T{ the account name which received the email T} T{ \fI%u\fR T} T{ sender mailbox name (e.\&g.\& "smith" in "smith@example.\&net") T} T{ \fI%v\fR T} T{ sender first name (e.\&g.\& "Alex" in "Alex Smith ") T} T{ \fI%Z\fR T} T{ flags (O=old, N=new, r=answered, D=deleted, !\&=flagged, *=marked, a=attachment) T} .TE .sp 1 \fBtimestamp-format\fR = \fI\fR .RS 4 See time.\&Time#Format at https://godoc.\&org/time#Time.\&Format .P Default: \fI2006-01-02 03:04 PM\fR (ISO 8601 + 12 hour time) .P .RE \fBthis-day-time-format\fR = \fI\fR .RS 4 Index-only time format for messages that were received/sent today.\& If this is not specified, \fBtimestamp-format\fR is used instead.\& .P .RE \fBthis-week-time-format\fR = \fI\fR .RS 4 Index-only time format for messages that were received/sent within the last 7 days.\& If this is not specified, \fBtimestamp-format\fR is used instead.\& .P .RE \fBthis-year-time-format\fR = \fI\fR .RS 4 Index-only time format for messages that were received/sent this year.\& If this is not specified, \fBtimestamp-format\fR is used instead.\& .P .RE \fBmessage-view-timestamp-format\fR = \fI\fR .RS 4 If set, overrides \fBtimestamp-format\fR for the message view.\& .P .RE \fBmessage-view-this-day-time-format\fR = \fI\fR .RS 4 If set, overrides \fBtimestamp-format\fR in the message view for messages that were received/sent today.\& .P .RE \fBmessage-view-this-week-time-format\fR = \fI\fR .RS 4 If set, overrides \fBtimestamp-format\fR in the message view for messages that were recieved/sent within the last 7 days.\& .P .RE \fBmessage-view-this-year-time-format\fR = \fI\fR .RS 4 If set, overrides \fBtimestamp-format\fR in the message view for messages that were received/sent this year.\& .P .RE \fBsidebar-width\fR = \fI\fR .RS 4 Width of the sidebar, including the border.\& Set to zero to disable the sidebar.\& .P Default: \fI20\fR .P .RE \fBempty-message\fR = \fI\fR .RS 4 Message to display when viewing an empty folder.\& .P Default: \fI(no messages)\fR .P .RE \fBempty-dirlist\fR = \fI\fR .RS 4 Message to display when no folders exists or are all filtered.\& .P Default: \fI(no folders)\fR .P .RE \fBmouse-enabled\fR = \fItrue\fR|\fIfalse\fR .RS 4 Enable mouse events in the ui, e.\&g.\& clicking and scrolling with the mousewheel .P Default: \fIfalse\fR .P .RE \fBnew-message-bell\fR = \fItrue\fR|\fIfalse\fR .RS 4 Ring the bell when a new message is received.\& .P Default: \fItrue\fR .P .RE \fBpinned-tab-marker\fR = \fI""\fR .RS 4 Marker to show before a pinned tab'\&s name.\& .P Default: \fI`\fR .P .RE \fBspinner\fR = \fI""\fR .RS 4 Animation shown while loading, split by \fBspinner-delimiter\fR (below) .P Examples: .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .IP \(bu 4 .\} \fBspinner\fR = \fI"-_-,_-_"\fR .RE .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .IP \(bu 4 .\} \fBspinner\fR = \fI'\&.\& , .\&'\&\fR .RE .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .IP \(bu 4 .\} \fBspinner\fR = \fI",|,/,-"\fR .RE .P Default: \fI"[.\&.\&] , [.\&.\&] , [.\&.\&] , [.\&.\&] , [.\&.\&], [.\&.\&] , [.\&.\&] , [.\&.\&] "\fR .P .RE \fBspinner-delimiter\fR = \fI\fR .RS 4 Spinner delimiter to split string into an animation .P Default: \fI,\fR .P .RE \fBsort\fR = \fI\fR .RS 4 List of space-separated criteria to sort the messages by, see \fB:sort\fR command in \fBaerc\fR(1) for reference.\& Prefixing a criterion with \fI-r\fR reverses that criterion.\& .P Example: .RS 4 \fBsort\fR = \fIfrom -r date\fR .P .RE .RE \fBdirlist-format\fR = \fI\fR .RS 4 Describes the format string to use for the directory list.\& .P Default: \fI%n %>r\fR .P .RE .TS allbox;c l c l c l c l c l c l. T{ \fBFormat specifier\fR T} T{ \fBDescription\fR T} T{ \fI%%\fR T} T{ literal % T} T{ \fI%n\fR T} T{ directory name T} T{ \fI%N\fR T} T{ compacted directory name T} T{ \fI%r\fR T} T{ recent/unseen/total message count T} T{ \fI%>X\fR T} T{ make format specifier '\&X'\& be right justified T} .TE .sp 1 \fBdirlist-delay\fR = \fI\fR .RS 4 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 \fI0s\fR.\& .P Default: \fI200ms\fR .P .RE \fBdirlist-tree\fR = \fItrue\fR|\fIfalse\fR .RS 4 Display the directory list as a foldable tree.\& .P Default: \fIfalse\fR .P .RE \fBdirlist-collapse\fR = \fI\fR .RS 4 If \fBdirlist-tree\fR is enabled, set level at which folders are collapsed by default.\& Set to \fI0\fR to disable.\& .P Default: \fI0\fR .P .RE \fBnext-message-on-delete\fR = \fItrue\fR|\fIfalse\fR .RS 4 Moves to next message when the current message is deleted, archived, or moved.\& .P Default: \fItrue\fR .P .RE \fBauto-mark-read\fR = \fItrue\fR|\fIfalse\fR .RS 4 Set the \fIseen\fR flag when a message is opened in the message viewer.\& .P Default: \fItrue\fR .P .RE \fBcompletion-popovers\fR = \fItrue\fR|\fIfalse\fR .RS 4 Shows potential auto-completions for text inputs in popovers.\& .P Default: \fItrue\fR .P .RE \fBcompletion-delay\fR = \fI\fR .RS 4 How long to wait after the last input before auto-completion is triggered.\& .P Default: \fI250ms\fR .P .RE \fBcompletion-min-chars\fR = \fI\fR .RS 4 The minimum required characters to allow auto-completion to be triggered after \fBcompletion-delay\fR.\& .P Default: \fI1\fR .P .RE \fBborder-char-vertical\fR = \fI""\fR .br \fBborder-char-horizontal\fR = \fI""\fR .RS 4 Set stylable characters (via the \fBborder\fR element) for vertical and horizontal borders.\& .P Default: \fI" "\fR .P .RE \fBstylesets-dirs\fR = \fI\fR .RS 4 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: .P .nf .RS 4 ${XDG_CONFIG_HOME:-~/\&.config}/aerc/stylesets ${XDG_DATA_HOME:-~/\&.local/share}/aerc/stylesets /usr/local/share/aerc/stylesets /usr/share/aerc/stylesets .fi .RE .P .RE \fBstyleset-name\fR = \fI\fR .RS 4 The name of the styleset to be used to style the ui elements.\& The stylesets are stored in the \fIstylesets\fR directory in the config directory.\& .P Default: \fIdefault\fR .P Have a look at \fBaerc-stylesets\fR(7) as to how a styleset looks like.\& .P .RE \fBicon-unencrypted\fR = \fI\fR .RS 4 The icon to display for unencrypted mails.\& The status indicator is only displayed if an icon is set.\& .P .RE \fBicon-encrypted\fR = \fI\fR .RS 4 The icon to display for encrypted mails.\& .P Default: \fI[e]\fR .P .RE \fBicon-signed\fR = \fI\fR .RS 4 The icon to display for signed mails where the signature was successfully validated.\& .P Default: \fI[s]\fR .P .RE \fBicon-signed-encrypted\fR = \fI\fR .RS 4 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.\& .P .RE \fBicon-unknown\fR = \fI\fR .RS 4 The icon to display for signed mails which could not be verified due to the key being unknown.\& .P Default: \fI[s?\&]\fR .P .RE \fBicon-invalid\fR = \fI\fR .RS 4 The icon to display for signed mails where verification failed.\& .P Default: \fI[s!\&]\fR .P .RE \fBicon-attachment\fR = \fI\fR .RS 4 The icon to display index-format when the message has an attachment.\& .P Default: \fIa\fR .P .RE \fBfuzzy-complete\fR = \fItrue\fR|\fIfalse\fR .RS 4 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.\& .P .RE \fBreverse-msglist-order\fR = \fItrue\fR|\fIfalse\fR .RS 4 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.\& .P Default: \fIfalse\fR .P .RE \fBreverse-thread-order\fR = \fItrue\fR|\fIfalse\fR .RS 4 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.\& .P Default: \fIfalse\fR .P .RE \fBsort-thread-siblings\fR = \fItrue\fR|\fIfalse\fR .RS 4 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.\& .P Default: \fIfalse\fR .P .RE \fBthreading-enabled\fR = \fItrue\fR|\fIfalse\fR .RS 4 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.\& .P Default: \fIfalse\fR .P .RE \fBforce-client-threads\fR = \fItrue\fR|\fIfalse\fR .RS 4 Force threads to be built client-side.\& Backends that don'\&t support threading will always build threads client side.\& .P Default: \fIfalse\fR .P .RE .SS CONTEXTUAL UI CONFIGURATION .P 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.\& .P The contextual UI configuration is merged to the base UiConfig in the following order: \fBBase UIConfig > Account Context > Folder Context > Subject Context.\&\fR .P \fB[ui:account=\fR\fIAccountName\fR\fB]\fR .RS 4 Adds account specific configuration with the account name.\& .P .RE \fB[ui:folder=\fR\fIFolderName\fR\fB]\fR .RS 4 Add folder specific configuration with the folder name.\& .P .RE \fB[ui:folder~\fR\fIRegex\fR\fB]\fR .RS 4 Add folder specific configuration for folders whose names match the regular expression.\& .P .RE \fB[ui:subject~\fR\fIRegex\fR\fB]\fR .RS 4 Add specialized ui configuration for messages that match a given regular expression.\& .P .RE Example: .nf .RS 4 [ui:account=Work] sidebar-width=\&.\&.\&. [ui:folder=Sent] index-format=\&.\&.\&. [ui:folder~Archive/d+/\&.*] index-format=\&.\&.\&. [ui:subject~^[PATCH] index-format=\&.\&.\&. .fi .RE .P .SH STATUSLINE .P These options are configured in the \fB[statusline]\fR section of \fIaerc.\&conf\fR.\& .P \fBrender-format\fR = \fI\fR .RS 4 Describes the format string for the statusline format.\& .P For a minimal statusline that only shows the current account and the connection information, use \fI[%a] %c\fR.\& .P To completely mute the statusline (except for push notifications), use \fI%m\fR only.\& .P Default: \fI[%a] %S %>%T\fR .P .RE .TS allbox;c l c l c l c l c l c l c l c l c l c l. T{ \fBFormat specifier\fR T} T{ \fBDescription\fR T} T{ \fI%%\fR T} T{ literal % T} T{ \fI%a\fR T} T{ active account name T} T{ \fI%d\fR T} T{ active directory name T} T{ \fI%c\fR T} T{ connection state T} T{ \fI%p\fR T} T{ current path T} T{ \fI%m\fR T} T{ mute statusline and show only push notifications T} T{ \fI%S\fR T} T{ general status information (e.\&g.\& connection state, filter, search) T} T{ \fI%T\fR T} T{ general on/off information (e.\&g.\& passthrough, threading, sorting) T} T{ \fI%>\fR T} T{ does not print anything but all format specifier that follow will be right justified.\& T} .TE .sp 1 \fBseparator\fR = \fI""\fR .RS 4 Specifies the separator between grouped statusline elements (e.\&g.\& for the \fI%S\fR and \fI%T\fR specifiers in \fBrender-format\fR).\& .P Default: \fI" | "\fR .P .RE \fBdisplay-mode\fR = \fItext\fR|\fIicon\fR .RS 4 Defines the mode for displaying the status elements.\& .P Default: \fItext\fR .P .RE .SH VIEWER .P These options are configured in the \fB[viewer]\fR section of \fIaerc.\&conf\fR.\& .P \fBpager\fR = \fI\fR .RS 4 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.\& .P Default: \fIless -R\fR .P .RE \fBalternatives\fR = \fI\fR .RS 4 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.\& .P Default: \fItext/plain,text/html\fR .P .RE \fBheader-layout\fR = \fI\fR .RS 4 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.\& \fIFrom|To\fR.\& Rows will be hidden if none of their specified headers are present in the message.\& .P Notmuch tags can be displayed by adding Labels.\& .P Authentication information from the Authentication-Results header can be displayed by adding \fIDKIM\fR, \fISPF\fR or \fIDMARC\fR.\& To show more information than just the authentication result, append a plus sign (\fB+\fR) to the header name (e.\&g.\& \fIDKIM+\fR).\& .P Default: \fIFrom|To,Cc|Bcc,Date,Subject\fR .P .RE \fBshow-headers\fR = \fItrue\fR|\fIfalse\fR .RS 4 Default setting to determine whether to show full headers or only parsed ones in message viewer.\& .P Default: \fIfalse\fR .P .RE \fBalways-show-mime\fR = \fItrue\fR|\fIfalse\fR .RS 4 Whether to always show the mimetype of an email, even when it is just a single part.\& .P Default: \fIfalse\fR .P .RE \fBparse-http-links\fR = \fItrue\fR|\fIfalse\fR .RS 4 Parses and extracts http links when viewing a message.\& Links can then be accessed with the \fBopen-link\fR command.\& .P Default: \fItrue\fR .P .RE .SH COMPOSE .P These options are configured in the \fB[compose]\fR section of \fIaerc.\&conf\fR.\& .P \fBeditor\fR = \fI\fR .RS 4 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.\& .P Defaults to \fB$EDITOR\fR, or \fBvi\fR(1).\& .P .RE \fBheader-layout\fR = \fI\fR .RS 4 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.\& \fITo|From\fR.\& .P Default: \fITo|From,Subject\fR .P .RE \fBaddress-book-cmd\fR = \fI\fR .RS 4 Specifies the command to be used to tab-complete email addresses.\& Any occurrence of \fI%s\fR in the \fBaddress-book-cmd\fR will be replaced with anything the user has typed after the last comma.\& .P 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.\& .P This parameter can also be set per account in \fIaccounts.\&conf\fR.\& .P Example: .RS 4 \fBaddress-book-cmd\fR = \fIkhard email --remove-first-line --parsable %s\fR .P .RE .RE \fBfile-picker-cmd\fR = \fI\fR .RS 4 Specifies the command to be used to select attachments.\& Any occurence of \fI%s\fR in the \fBfile-picker-cmd\fR will be replaced with the argument \fI\fR to \fB:attach -m\fR \fI\fR.\& .P The command must output the selected files to standard output, one file per line.\& .P Example: .RS 4 \fBfile-picker-cmd\fR = \fIfzf --multi --query=%s\fR .P .RE .RE \fBreply-to-self\fR = \fItrue\fR|\fIfalse\fR .RS 4 If set to \fIfalse\fR, 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).\& .P Default: \fItrue\fR .P .RE \fBno-attachment-warning\fR = \fI\fR .RS 4 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.\& .P Uses Go'\&s regexp syntax, documented at https://golang.\&org/s/re2syntax.\& The \fI(?\&im)\fR flags are set by default (case-insensitive and multi-line).\& .P Example: .RS 4 \fBno-attachment-warning\fR = \fI^[^>]*attach(ed|ment)\fR .P .RE .RE .SH MULTIPART CONVERTERS .P Converters allow to generate \fImultipart/alternative\fR messages by converting the main \fItext/plain\fR body into any other text MIME type with the \fB:multipart\fR command.\& Only exact MIME types are accepted.\& The commands are invoked with \fIsh -c\fR and are expected to output valid UTF-8 text.\& .P Only \fItext/\fR MIME parts can be generated.\& The \fItext/plain\fR MIME type is reserved and cannot be generated.\& You still need to write your emails by hand in your favorite text editor.\& .P Converters are configured in the \fB[multipart-converters]\fR section of \fIaerc.\&conf\fR.\& .P Example: .P .nf .RS 4 [multipart-converters] text/html=pandoc -f markdown -t html --standalone .fi .RE .P Obviously, this requires that you write your main \fItext/plain\fR body using the markdown syntax.\& Also, mind that some mailing lists reject emails that contain \fItext/html\fR alternative parts.\& Use this feature carefully and when possible, avoid using it at all.\& .P .SH FILTERS .P 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 \fBpager\fR in aerc'\&s built-in terminal.\& .P Filters are configured in the \fB[filters]\fR section of \fBaerc.\&conf\fR.\& 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.\& \fIsubject,text\fR will match a subject which contains \fItext\fR.\& Use \fIheader,~regex\fR to match against a \fIregex\fR.\& .P 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 \fI-\fR instead of a path to a file.\& You can also chain together multiple filters by piping with \fI|\fR.\& .P aerc ships with some default filters installed in the share directory (usually \fI/usr/share/aerc/filters\fR).\& Note that these may have additional dependencies that aerc does not have alone.\& .P The filter commands are invoked with \fIsh -c command\fR.\& The following folders are appended to the system \fB$PATH\fR to allow referencing filters from their name only.\& .P .nf .RS 4 ${XDG_CONFIG_HOME:-~/\&.config}/aerc/filters ${XDG_DATA_HOME:-~/\&.local/share}/aerc/filters $PREFIX/share/aerc/filters /usr/share/aerc/filters .fi .RE .P The following variables are defined in the filter command environment: .P \fBAERC_MIME_TYPE\fR .RS 4 the part MIME type/subtype .RE \fBAERC_FORMAT\fR .RS 4 the part content type format= parameter (e.\&g.\& format=flowed) .RE \fBAERC_FILENAME\fR .RS 4 the attachment filename (if any) .RE \fBAERC_SUBJECT\fR .RS 4 the message Subject header value .RE \fBAERC_FROM\fR .RS 4 the message From header value .P .RE Note that said email body is converted into UTF-8 before being passed to filters.\& .P .SS EXAMPLES .P \fItext/plain\fR .RS 4 Color some things, e.\&g.\& quotes, git diffs, links, etc.\&: .P .nf .RS 4 text/plain=colorize .fi .RE .P The built-in \fIcolorize\fR filter supports alternative themes: .P .nf .RS 4 text/plain=colorize -v theme=solarized .fi .RE .P Wrap long lines at 100 characters, while not messing up nested quotes.\& Handles format=flowed emails properly: .P .nf .RS 4 text/plain=wrap -w 100 | colorize .fi .RE .P .RE \fIfrom,\fR .RS 4 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: .P .nf .RS 4 from,thatguywhoneverhardwrapshismessages=wrap -r -w 72 | colorize .fi .RE .P .RE \fIsubject,~\fR .RS 4 Use rainbow coloring with \fBlolcat\fR(1) for emails sent by software forges: .P .nf .RS 4 subject,~Git(hub|lab)=lolcat -f .fi .RE .P .RE \fItext/html\fR .RS 4 Render html to a more human readable version and colorize: .P .nf .RS 4 text/html=html | colorize .fi .RE .P Use pandoc to output plain text: .P .nf .RS 4 text/html=pandoc -f html -t plain .fi .RE .P .RE \fItext/calendar\fR .RS 4 Parse calendar invites: .P .nf .RS 4 text/calendar=calendar .fi .RE .P .RE \fItext/*\fR .RS 4 Catch any other type of text that did not have a specific filter and use \fBbat\fR(1) to color these: .P .nf .RS 4 text/*=bat -fP --file-name="$AERC_FILENAME" --style=plain .fi .RE .P .RE \fImessage/delivery-status\fR .RS 4 When not being able to deliver the provider might send such emails: .P .nf .RS 4 message/delivery-status=colorize .fi .RE .P .RE \fImessage/rfc822\fR .RS 4 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 \fBcaeml\fR(1) to be on \fBPATH\fR: .P .nf .RS 4 message/rfc822=caeml | colorize .fi .RE .P https://github.\&com/ferdinandyb/caeml .P .RE \fIapplication/mbox\fR .RS 4 Emails as attachments in the mbox format.\& For example aerc can also create an mbox from messages with the \fB:pipe\fR command.\& Requires \fBcatbox\fR(1) and \fBcaeml\fR(1) to be on \fBPATH\fR: .P .nf .RS 4 application/mbox=catbox -c caeml | colorize .fi .RE .P https://github.\&com/konimarti/catbox .P .RE \fIapplication/pdf\fR .RS 4 Render pdf to text and rewrap at 100 character width.\& Requires \fBpdftotext\fR(1) to be on \fBPATH\fR: .P .nf .RS 4 application/pdf=pdftotext - -l 10 -nopgbrk -q - | fmt -w 100 .fi .RE .P https://www.\&xpdfreader.\&com/pdftotext-man.\&html .P .RE \fIimage/*\fR .RS 4 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.\& .P The built-in terminal can show pixelated images with \fBcatimg\fR(1): .P .nf .RS 4 image/*=catimg -w$(tput cols) - .fi .RE .P .RE 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 \fIcolorize\fR).\& .P .SH OPENERS .P Openers allow you to specify the command to use for the \fB:open\fR action on a per-MIME-type basis.\& They are configured in the \fB[openers]\fR section of \fIaerc.\&conf\fR.\& .P \fI{}\fR 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.\& .P Example: .P .nf .RS 4 [openers] text/html=surf -dfgms text/plain=gvim {} +125 message/rfc822=thunderbird .fi .RE .P .SH TRIGGERS .P Triggers specify commands to execute when certain events occur.\& .P They are configured in the \fB[triggers]\fR section of \fIaerc.\&conf\fR.\& .P \fBnew-email\fR = \fI\fR .RS 4 Executed when a new email arrives in the selected folder.\& .P e.\&g.\& new-email=exec notify-send "New email from %n" "%s" .P Format specifiers from \fBindex-format\fR are expanded with respect to the new message.\& .P .RE .SH TEMPLATES .P Templates are used to populate the body of an email.\& The \fB:compose\fR, \fB:reply\fR and \fB:forward\fR commands can be called with the \fB-T\fR flag with the name of the template name.\& .P aerc ships with some default templates installed in the share directory (usually \fI/usr/share/aerc/templates\fR).\& .P These options are configured in the \fB[templates]\fR section of \fIaerc.\&conf\fR.\& .P \fBtemplate-dirs\fR = \fI\fR .RS 4 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: .P .nf .RS 4 ${XDG_CONFIG_HOME:-~/\&.config}/aerc/templates ${XDG_DATA_HOME:-~/\&.local/share}/aerc/templates /usr/local/share/aerc/templates /usr/share/aerc/templates .fi .RE .P .RE \fBnew-message\fR = \fI\fR .RS 4 The default template to be used for new messages.\& .P Default: \fInew_message\fR .P .RE \fBquoted-reply\fR = \fI\fR .RS 4 The default template to be used for quoted replies.\& .P Default: \fIquoted_reply\fR .P .RE \fBforwards\fR = \fI\fR .RS 4 The default template to be used for forward as body.\& .P Default: \fIforward_as_body\fR .P .RE .SH SEE ALSO .P \fBaerc\fR(1) \fBaerc-accounts\fR(5) \fBaerc-binds\fR(5) \fBaerc-imap\fR(5) \fBaerc-maildir\fR(5) \fBaerc-notmuch\fR(5) \fBaerc-templates\fR(7) \fBaerc-sendmail\fR(5) \fBaerc-smtp\fR(5) \fBaerc-stylesets\fR(7) .P .SH AUTHORS .P 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/.\&