Debian Codegraph @

doc/aerc-config.5.scd

raw
1 AERC-CONFIG(5)
2
3 # NAME
4
5 aerc-config - configuration file format for *aerc*(1)
6
7 # SYNOPSIS
8
9 There are three aerc config files: _aerc.conf_, _binds.conf_, and
10 _accounts.conf_. The last one must be kept secret, as it may include your
11 account credentials. We look for these files in your XDG config home plus
12 _aerc_, which defaults to _~/.config/aerc_. Alternate files can be specified via
13 command line arguments, see *aerc*(1).
14
15 Examples of these config files are typically included with your installation of
16 aerc and are usually installed in _/usr/share/aerc_.
17
18 Each file uses the ini format, and consists of sections with keys and values.
19 A line beginning with _#_ is considered a comment and ignored, as are empty
20 lines. New sections begin with _[section-name]_ on a single line, and keys and
21 values are separated with _=_.
22
23 This manual page focuses on _aerc.conf_. _binds.conf_ is detailed in
24 *aerc-binds*(5) and _accounts.conf_ in *aerc-accounts*(5).
25
26 _aerc.conf_ is used for configuring the general appearance and behavior of aerc.
27
28 # GENERAL OPTIONS
29
30 These options are configured in the *[general]* section of _aerc.conf_.
31
32 *default-save-path* = _<path>_
33 Used as a default path for save operations if no other path is specified.
34
35 *pgp-provider* = _auto_|_gpg_|_internal_
36 If set to _gpg_, aerc will use system gpg binary and keystore for all
37 crypto operations. If set to _internal_, the internal openpgp keyring
38 will be used. If set to _auto_, the system gpg will be preferred unless
39 the internal keyring already exists, in which case the latter will be
40 used.
41
42 Default: _auto_
43
44 *use-terminal-pinentry* = _true_|_false_
45 For terminal-based pinentry programs (such as _pinentry-tty_,
46 _pinentry-curses_ or _pinentry-vaxis_) to work properly with *aerc*(1),
47 set this to _true_.
48
49 In some setups *aerc*(1) will not be able to determine the correct tty.
50 In those cases, you have to manually set _GPG_TTY_ to the output of *tty*(1)
51 before running *aerc*(1) as recommended by GnuPG for invoking a GPG-agent. Add
52 the following to your shell initialization scripts:
53
54 ```
55 GPG_TTY=$(tty)
56 export GPG_TTY
57 ```
58
59 Default: _false_
60
61 *unsafe-accounts-conf* = _true_|_false_
62 By default, the file permissions of _accounts.conf_ must be restrictive
63 and only allow reading by the file owner (_0600_). Set this option to
64 _true_ to ignore this permission check. Use this with care as it may
65 expose your credentials.
66
67 Default: _false_
68
69 *log-file* = _<path>_
70 Output log messages to specified file. A path starting with _~/_ is
71 expanded to the user home dir. When redirecting aerc's output to a file
72 using _>_ shell redirection, this setting is ignored and log messages
73 are printed to stdout.
74
75 *log-level* = _trace_|_debug_|_info_|_warn_|_error_
76 Only log messages above the specified level to *log-file*. Supported
77 levels are: _trace_, _debug_, _info_, _warn_ and _error_. When
78 redirecting aerc's output to a file using _>_ shell redirection, this
79 setting is ignored and the log level is forced to _trace_.
80
81 Default: _info_
82
83 *disable-ipc* = _true_|_false_
84 Disable IPC entirely. Don't run commands (including _mailto:..._ and
85 _mbox..._) in an existing aerc instance and don't start an IPC server to
86 allow subsequent aerc instances to run commands in the current one.
87
88 Default: _false_
89
90 *disable-ipc-mailto* = _true_ | _false_
91 Don't run _mailto:..._ commands over IPC; start a new aerc instance with the
92 composer instead.
93
94 Default: _false_
95
96 *disable-ipc-mbox* = _true_ | _false_
97 Don't run _mbox:..._ commands over IPC; start a new aerc instance with the
98 mbox file instead.
99
100 Default: _false_
101
102 *term* = _<TERM>_
103 Set the $TERM environment variable used for the embedded terminal.
104
105 Default: _xterm-256color_
106
107 *inherit-host-tty-features* = _true_|_false_
108 Enable inheriting host terminal features in the embedded terminal. When
109 enabled, the embedded terminal negotiates advanced keyboard protocols
110 with child processes, allowing disambiguation of modified keys (e.g.
111 Ctrl+Backspace is no longer aliased to C-h). Also enables hyperlink
112 support (OSC 8), clipboard integration (OSC 52), inline image display,
113 and foreground/background color queries (OSC 10/11) for child processes.
114 Requires a compatible host terminal.
115
116 Default: _true_
117
118 *enable-quake-mode* = _true_|_false_
119 Enable Quake mode which consists of a persistent drop-down terminal
120 session that appears at the top of *aerc* and can be toggled on or off.
121
122 Toggling is done with the F1 key. Do not use this key in your key
123 bindings in Quake mode.
124
125 Default: _false_
126
127 *default-menu-cmd* = _<cmd>_
128 Default shell command to use for *:menu*. This will be executed with
129 _sh -c_ and will run in a popover dialog.
130
131 Any occurrence of _%f_ will be replaced by a temporary file path where
132 the command is expected to write output lines to be consumed by *:menu*.
133 Otherwise, the lines will be read from the command's standard output.
134
135 Example:
136 *default-menu-cmd* = _fzf_
137
138 *temporary-directory* = _<path>_
139 Directory where aerc saves temporary files. If it does not exist, the
140 directory will be created along with its parents with permissions _700_.
141 If this is empty (which is the default), the platform-specific default
142 directory for temporary files is used.
143
144 # UI OPTIONS
145
146 These options are configured in the *[ui]* section of _aerc.conf_.
147
148 *index-columns* = _<column1,column2,column3...>_
149 Describes the format for each row in a mailbox view. This is a comma
150 separated list of column names with an optional align and width suffix.
151 After the column name, one of the _<_ (left), _:_ (center) or _>_
152 (right) alignment characters can be added (by default, left) followed by
153 an optional width specifier. The width is either an integer representing
154 a fixed number of characters, or a percentage between _1%_ and _99%_
155 representing a fraction of the terminal width. It can also be one of the
156 _\*_ (auto) or _=_ (fit) special width specifiers. Auto width columns
157 will be equally attributed the remaining terminal width. Fit width
158 columns take the width of their contents. If no width specifier is set,
159 _\*_ is used by default.
160
161 Default: _flags:4,name<20%,subject,date>=_
162
163 *column-separator* = _"<separator>"_
164 String separator inserted between columns. When a column width specifier
165 is an exact number of characters, the separator is added to it (i.e. the
166 exact width will be fully available for that column contents).
167
168 Default: _" "_
169
170 *column-<name>* = _<go template>_
171 Each name in *index-columns* must have a corresponding *column-<name>*
172 setting. All *column-<name>* settings accept golang text/template
173 syntax.
174
175 By default, these columns are defined:
176
177 ```
178 column-flags = {{.Flags | join ""}}
179 column-name = {{index (.From | names) 0}}
180 column-subject = {{.ThreadPrefix}}{{.Subject}}
181 column-date = {{.DateAutoFormat .Date.Local}}
182 ```
183
184 See *aerc-templates*(7) for all available symbols and functions.
185
186 *timestamp-format* = _<timeformat>_
187 See time.Time#Format at https://godoc.org/time#Time.Format
188
189 Default: _2006 Jan 02_
190
191 *this-day-time-format* = _<timeformat>_
192 Index-only time format for messages that were received/sent today.
193 If this is empty, *timestamp-format* is used instead.
194
195 Default: _15:04_
196
197 *this-week-time-format* = _<timeformat>_
198 Index-only time format for messages that were received/sent within the
199 last 7 days. If this is empty, *timestamp-format* is used instead.
200
201 Default: _Jan 02_
202
203 *this-year-time-format* = _<timeformat>_
204 Index-only time format for messages that were received/sent this year.
205 If this is empty, *timestamp-format* is used instead.
206
207 Default: _Jan 02_
208
209 *message-view-timestamp-format* = _<timeformat>_
210 If set, overrides *timestamp-format* for the message view.
211
212 Default: _2006 Jan 02, 15:04 GMT-0700_
213
214 *message-view-this-day-time-format* = _<timeformat>_
215 If set, overrides *timestamp-format* in the message view for messages
216 that were received/sent today.
217
218 *message-view-this-week-time-format* = _<timeformat>_
219 If set, overrides *timestamp-format* in the message view for messages
220 that were received/sent within the last 7 days.
221
222 *message-view-this-year-time-format* = _<timeformat>_
223 If set, overrides *timestamp-format* in the message view for messages
224 that were received/sent this year.
225
226 *sidebar-width* = _<int>_
227 Width of the sidebar, including the border. Set to zero to disable the
228 sidebar.
229
230 Default: _22_
231
232 *message-list-split* = _[<direction>] <size>_
233 The default split layout for message list tabs.
234
235 _<direction>_ is optional and defaults to _horizontal_. It can take one
236 of the following values: _h_, _horiz_, _horizontal_, _v_, _vert_,
237 _vertical_.
238
239 _<size>_ is a positive integer representing the size (in terminal cells)
240 of the message list window.
241
242 See *:split* in *aerc*(1) for more details.
243
244 *empty-message* = _<string>_
245 Message to display when viewing an empty folder.
246
247 Default: _(no messages)_
248
249 *empty-dirlist* = _<string>_
250 Message to display when no folders exist or are all filtered.
251
252 Default: _(no folders)_
253
254 *empty-subject* = _<string>_
255 Text to display in message list, when the subject is empty.
256
257 Default: _(no subject)_
258
259 *mouse-enabled* = _true_|_false_
260 Enable mouse events in the ui, e.g. clicking and scrolling with the mousewheel
261
262 Default: _false_
263
264 *new-message-bell* = _true_|_false_
265 Ring the bell when a new message is received.
266
267 Default: _true_
268
269 *tab-title-account* = _<go_template>_
270 The template to use for account tab titles. See *aerc-templates*(7) for
271 available field names. To conditionally show the unread count next to
272 the account name, set to:
273
274 *tab-title-account* = {{.Account}} {{if .Unread}}({{.Unread}}){{end}}
275
276 Default: _{{.Account}}_
277
278 *tab-title-composer* = _<go_template>_
279 The template to use for composer tab titles. See *aerc-templates*(7) for
280 available field names.
281
282 Default: _{{if .To}}to:{{index (.To | shortmboxes) 0}} {{end}}{{.SubjectBase}}_
283
284 *tab-title-terminal* = _<go_template>_
285 The template to use for terminal tab titles. See *aerc-templates*(7) for
286 available field names. This setting is only valid in the global *[ui]*
287 section.
288
289 Default: _{{.Title}}_
290
291 *tab-title-viewer* = _<go_template>_
292 The template to use for viewer tab titles. See *aerc-templates*(7) for
293 available field names.
294
295 Default: _{{.Subject}}_
296
297 *pinned-tab-marker* = _"<string>"_
298 Marker to show before a pinned tab's name.
299
300 Default: _`_
301
302 *spinner* = _"<string>"_
303 Animation shown while loading, split by *spinner-delimiter* (below)
304
305 Examples:
306 - *spinner* = _"\-\_-,\_-\_"_
307 - *spinner* = _'. , .'_
308 - *spinner* = _"\,|,/,-"_
309
310 Default: _"[..] , [..] , [..] , [..] , [..], [..] , [..] , [..] "_
311
312 *spinner-delimiter* = _<string>_
313 Spinner delimiter to split string into an animation
314
315 Default: _,_
316
317 *spinner-interval* = _<duration>_
318 The delay between each spinner frame
319
320 Default: _200ms_
321
322 *sort* = _<criteria>_
323 List of space-separated criteria to sort the messages by, see *:sort*
324 command in *aerc*(1) for reference. Prefixing a criterion with _-r_
325 reverses that criterion.
326
327 Example:
328 *sort* = _from -r date_
329
330 *dirlist-left* = _<go template>_
331 Template for the left side of the directory list.
332 See *aerc-templates*(7) for all available fields and functions.
333
334 Default: _{{.Folder}}_
335
336 *dirlist-right* = _<go template>_
337 Template for the right side of the directory list.
338 See *aerc-templates*(7) for all available fields and functions.
339
340 Default: _{{if .Unread}}{{humanReadable .Unread}}{{end}}_
341
342 *dirlist-delay* = _<duration>_
343 Delay after which the messages are actually listed when entering
344 a directory. This avoids loading messages when skipping over folders
345 and makes the UI more responsive. If you do not want that, set it to
346 _0s_.
347
348 Default: _200ms_
349
350 *dirlist-tree* = _true_|_false_
351 Display the directory list as a foldable tree.
352
353 Default: _false_
354
355 *dirlist-collapse* = _<int>_
356 If *dirlist-tree* is enabled, set level at which folders are collapsed
357 by default. Set to _0_ to disable.
358
359 Default: _0_
360
361 *next-message-on-delete* = _true_|_false_
362 Moves to next message when the current message is deleted, archived, or moved.
363
364 Default: _true_
365
366 *auto-mark-read* = _true_|_false_
367 Set the _seen_ flag when a message is opened in the message viewer.
368
369 Default: _true_
370
371 *auto-mark-read-split* = _true_|_false_
372 If _true_ and a message is in the message list message viewer for longer
373 than _auto-mark-read-split-delay_, set that message's _seen_ flag to _true_.
374
375 Default: _false_
376
377 *auto-mark-read-split-delay* = _<duration>_
378 If _auto-mark-read-split_ is _true_, the duration after which a message
379 being previewed in the message list message viewer must be marked as _seen_.
380
381 Default: _3s_
382
383 *completion-popovers* = _true_|_false_
384 Shows potential auto-completions for text inputs in popovers.
385
386 Default: _true_
387
388 *completion-delay* = _<duration>_
389 How long to wait after the last input before auto-completion is triggered.
390
391 Default: _250ms_
392
393 *completion-min-chars* = _<int>_
394 The minimum required characters to allow auto-completion to be triggered
395 after *completion-delay*.
396
397 Setting this to _manual_ disables automatic completion, leaving only the
398 manually triggered completion with the *$complete* key (see
399 *aerc-binds*(5) for more details).
400
401 Default: _1_
402
403 *keyhint* = _true_|_false_
404 When a key is pressed that starts a multi-key binding, show a popup
405 listing possible continuations. The popup uses annotations from
406 _binds.conf_ as descriptions. Bindings without annotations will show
407 their command text instead.
408
409 Default: _false_
410
411 *keyhint-delay* = _<duration>_
412 The delay after pressing a multi-key binding prefix before the
413 keyhint popup is displayed. This avoids flickering during fast key
414 sequences. Only applies when *keyhint* is enabled.
415
416 Default: _200ms_
417
418 *keyhint-position* = _bottom-left_|_bottom-center_|_bottom-right_
419 Position of the keyhint popup on screen. When left empty (default),
420 the position is auto-detected from the _[statusline]_ column
421 containing _{{.PendingKeys}}_.
422
423 Default: _auto-detected_
424
425 *border-char-vertical* = _"<char>"_
426 Set stylable character (via the *border* element) for vertical borders.
427
428 Default: _"│"_
429
430 *border-char-horizontal* = _"<char>"_
431 Set stylable character (via the *border* element) for horizontal borders.
432
433 Default: _"─"_
434
435 *stylesets-dirs* = _<path1:path2:path3...>_
436 The directories where the stylesets are stored. The config takes
437 a colon-separated list of dirs. If this is unset or if a styleset cannot
438 be found, the following paths will be used as a fallback in that order:
439
440 ```
441 ${XDG_CONFIG_HOME:-~/.config}/aerc/stylesets
442 ${XDG_DATA_HOME:-~/.local/share}/aerc/stylesets
443 /usr/local/share/aerc/stylesets
444 /usr/share/aerc/stylesets
445 ```
446
447 *styleset-name* = _<string>_
448 The name of the styleset to be used to style the ui elements. The
449 stylesets are stored in the _stylesets_ directory in the config
450 directory.
451
452 Use comma-separated list of file names to load multiple stylesets applied
453 one after another in the order they are provided. This is useful if you want
454 to alter the main styleset just a bit for a specific account, say to provide
455 a specific messages highlighting pattern.
456
457 Default: _default_
458
459 Have a look at *aerc-stylesets*(7) as to how a styleset looks like.
460
461 *icon-unencrypted* = _<string>_
462 The icon to display for unencrypted mails. The status indicator is only
463 displayed if an icon is set.
464
465 *icon-encrypted* = _<string>_
466 The icon to display for encrypted mails.
467
468 Default: _[e]_
469
470 *icon-signed* = _<string>_
471 The icon to display for signed mails where the signature was
472 successfully validated.
473
474 Default: _[s]_
475
476 *icon-signed-encrypted* = _<string>_
477 The icon to display for signed and encrypted mails where the signature
478 was successfully verified. The combined icon is only used if set,
479 otherwise the signed and encrypted icons are displayed separately.
480
481 *icon-unknown* = _<string>_
482 The icon to display for signed mails which could not be verified due to
483 the key being unknown.
484
485 Default: _[s?]_
486
487 *icon-invalid* = _<string>_
488 The icon to display for signed mails where verification failed.
489
490 Default: _[s!]_
491
492 *icon-attachment* = _<string>_
493 The icon to display in *column-flags* when the message has an
494 attachment.
495
496 Default: _a_
497
498 *icon-new* = _<string>_
499 The icon to display in *column-flags* when the message is unread and
500 new.
501
502 Default: _N_
503
504 *icon-old* = _<string>_
505 The icon to display in *column-flags* when the message is unread and
506 old.
507
508 Default: _O_
509
510 *icon-replied* = _<string>_
511 The icon to display in *column-flags* when the message has been replied
512 to.
513
514 Default: _r_
515
516 *icon-forwarded* = _<string>_
517 The icon to display in *column-flags* when the message has been forwarded.
518
519 Default: _f_
520
521 *icon-flagged* = _<string>_
522 The icon to display in *column-flags* when the message is flagged.
523
524 Default: _!_
525
526 *icon-marked* = _<string>_
527 The icon to display in *column-flags* when the message is marked.
528
529 Default: _\*_
530
531 *icon-draft* = _<string>_
532 The icon to display in *column-flags* when the message is a draft.
533
534 Default: _d_
535
536 *icon-deleted* = _<string>_
537 The icon to display in *column-flags* when the message has been deleted.
538
539 Default: _X_
540
541 *fuzzy-complete* = _true_|_false_
542 When typing a command or option, the popover will now show not only the
543 items /starting/ with the string input by the user, but it will also show
544 instances of items /containing/ the string, starting at any position and
545 need not be consecutive characters in the command or option.
546
547 *reverse-msglist-order* = _true_|_false_
548 Reverses the order of the message list. By default, the message list is
549 ordered with the newest (highest UID) message on top. Reversing the
550 order will put the oldest (lowest UID) message on top. This can be
551 useful in cases where the backend does not support sorting.
552
553 Default: _false_
554
555 *reverse-thread-order* = _true_|_false_
556 Reverse display of the message threads. By default, the thread root is
557 displayed at the top of the tree with all replies below. The reverse
558 option will put the thread root at the bottom with replies on top.
559
560 Default: _false_
561
562 *select-last-message* = _true_|_false_
563 Positions the cursor on the last message in the message list (at the
564 bottom of the view) when opening a new folder.
565
566 Default: _false_
567
568 *sort-thread-siblings* = _true_|_false_
569 Sort the thread siblings according to the *sort* criteria for the
570 messages. If *sort-thread-siblings* is _false_, the thread siblings will
571 be sorted based on the message UID in ascending order. If this option is
572 set to _false_ and *threading-by-subject* is set to _true_, then
573 siblings will be ordered by subject headers using UTF-8 sorting.
574
575 This option is only applicable for client-side threading with a backend
576 that enables sorting. Note that there's a performance impact when
577 sorting is activated.
578
579 Default: _false_
580
581 *threading-enabled* = _true_|_false_
582 Enable a threaded view of messages. If this is not supported by the
583 backend (IMAP server or notmuch), threads will be built by the client.
584
585 Default: _false_
586
587 *force-client-threads* = _true_|_false_
588 Force threads to be built client-side. Backends that don't support threading
589 will always build threads client side.
590
591 Default: _false_
592
593 *threading-by-subject* = _true_|_false_
594 If no References nor In-Reply-To headers can be matched to build client
595 side threads, fallback to similar subjects. This setting also affects
596 how thread siblings are ordered when *sort-thread-siblings* is left to
597 _false_.
598
599 Default: _false_
600
601 *client-threads-delay* = _<duration>_
602 Delay of inactivity after which the client threads are rebuilt. Setting
603 this to _0s_ may introduce a noticeable lag when scrolling through the
604 message list.
605
606 Default: _50ms_
607
608 *show-thread-context* = _true_|_false_
609 Enable showing of thread context. Note: this is currently only supported
610 by the notmuch backend.
611
612 Default: _false_
613
614 *msglist-scroll-offset* = _<int>_
615 Set the scroll offset in number of lines from the top and bottom
616 of the message list.
617
618 Default: _0_
619
620 *dialog-position* = _top_|_center_|_bottom_
621 Set the position of popover dialogs such as the one from *:menu*,
622 *:envelope* or *:attach -m*.
623
624 Default: _center_
625
626 *dialog-width* = _<percentage>_
627 Set the width of popover dialogs as a percentage of the total width of
628 the window. The specified value should be between _10_ and _100_.
629
630 Default: _50_
631
632 *dialog-height* = _<percentage>_
633 Set the height of popover dialogs as a percentage of the total height of
634 the window. The specified value should be between _10_ and _100_.
635
636 Default: _50_
637
638 *quake-terminal-height* = _<int>_
639 Set the height of drop-down terminal as the number of lines from the
640 top.
641
642 Default: _20_
643
644 ## THREAD PREFIX CUSTOMIZATION
645
646 You can fully customize the thread arrows appearance, which is defined by the
647 following configurable prefix parts:
648
649 *thread-prefix-tip* = _<string>_
650 Define the arrow head.
651
652 Default: _">"_
653
654 *thread-prefix-indent* = _<string>_
655 Define the arrow indentation.
656
657 Default: _" "_
658
659 *thread-prefix-stem* = _<string>_
660 Define the vertical extension of the arrow.
661
662 Default: _"│"_
663
664 *thread-prefix-limb* = _<string>_
665 Define the horizontal extension of the arrow.
666
667 Default: _""_
668
669 *thread-prefix-folded* = _<string>_
670 Define the folded thread indicator.
671
672 Default: _"+"_
673
674 *thread-prefix-unfolded* = _<string>_
675 Define the unfolded thread indicator.
676
677 Default: _""_
678
679 *thread-prefix-first-child* = _<string>_
680 Define the first child connector.
681
682 Default: _""_
683
684 *thread-prefix-has-siblings* = _<string>_
685 Define the connector used if the message has siblings.
686
687 Default: _├─_
688
689 *thread-prefix-lone* = _<string>_
690 Define the connector used if the message has no parents and no children.
691
692 Default: _""_
693
694 *thread-prefix-orphan* = _<string>_
695 Define the connector used if the message has no parents and has children.
696
697 Default: _""_
698
699 *thread-prefix-last-sibling* = _<string>_
700 Define the connector for the last sibling.
701
702 Default: _└─_
703
704 *thread-prefix-last-sibling-reverse* = _<string>_
705 Define the connector for the last sibling in reversed threads.
706
707 Default: _┌─_
708
709 *thread-prefix-dummy* = _<string>_
710 Define the connector for the dummy head.
711
712 Default: _┬─_
713
714 *thread-prefix-dummy-reverse* = _<string>_
715 Define the connector for the dummy head in reversed threads.
716
717 Default: _┴─_
718
719 *thread-prefix-first-child-reverse* = _<string>_
720
721 Define the arrow appearance by selecting the first child connector in
722 reversed threads.
723
724 Default: _""_
725
726 *thread-prefix-orphan-reverse* = _<string>_
727 Customize the reversed threads arrow appearance by selecting the
728 connector used if the message has no parents and has children.
729
730 Default: _""_
731
732 Default settings (mutt-style):
733
734 ```
735 [PATCH aerc v5] ui: allow thread arrow customisation
736 ├─>[aerc/patches] build success
737 ├─>Re: [PATCH aerc v5] ui: allow thread arrow customisation
738 ├─+
739 └─>
740 ├─>
741 │ ├─>
742 │ └─>
743 │ └─>
744 └─>
745 ```
746
747 More compact, rounded threads that are also fold-aware:
748
749 ```
750 ┌[PATCH aerc v5] ui: allow thread arrow customisation
751 ├─[aerc/patches] build success
752 ├─Re: [PATCH aerc v5] ui: allow thread arrow customisation
753 ├+
754 ╰┬
755 ├┬
756 │├─
757 │╰┬
758 │ ╰─
759 ╰─
760 ```
761
762 ```
763 thread-prefix-tip = ""
764 thread-prefix-indent = ""
765 thread-prefix-stem = "│"
766 thread-prefix-limb = "─"
767 thread-prefix-folded = "+"
768 thread-prefix-unfolded = ""
769 thread-prefix-first-child = "┬"
770 thread-prefix-has-siblings = "├"
771 thread-prefix-orphan = "┌"
772 thread-prefix-dummy = "┬"
773 thread-prefix-lone = " "
774 thread-prefix-last-sibling = "â•°"
775 ```
776
777 *centered-layout-width* = _<width>_
778 Center the editor and the message viewer on screen by setting a fixed
779 width for them.
780
781 _<width>_ is a positive integer representing the width (in terminal cells)
782 of the editor and message viewer windows.
783
784 Default: _""_
785
786
787 ## CONTEXTUAL UI CONFIGURATION
788
789 The UI configuration can be specialized for accounts and specific mail
790 directories. The specializations are added using contextual config
791 sections based on the context.
792
793 The contextual UI configuration is merged to the base UiConfig in the
794 following order: *Base UIConfig > Account Context > Folder Context*.
795
796 *[ui:account=*_AccountName_*]*
797 Adds account specific configuration with the account name.
798
799 *[ui:folder=*_FolderName_*]*
800 Add folder specific configuration with the folder name.
801
802 *[ui:folder~*_Regex_*]*
803 Add folder specific configuration for folders whose names match the regular
804 expression.
805
806 Example:
807 ```
808 [ui:account=Work]
809 sidebar-width=...
810
811 [ui:folder=Sent]
812 index-columns=...
813
814 [ui:folder~Archive/\d+/.*]
815 index-columns=...
816 ```
817
818 # STATUSLINE
819
820 These options are configured in the *[statusline]* section of _aerc.conf_.
821
822 *status-columns* = _<column1,column2,column3...>_
823 Describes the format for the statusline. This is a comma separated list
824 of column names with an optional align and width suffix. See
825 *[ui].index-columns* for more details.
826
827 To completely mute the statusline (except for push notifications),
828 explicitly set *status-columns* to an empty string:
829
830 status-columns=
831
832 Default: _left<\*,center>=,right>\*_
833
834 *column-separator* = _"<separator>"_
835 String separator inserted between columns. See *[ui].column-separator*
836 for more details.
837
838 Default: _" "_
839
840 *column-<name>* = _<go template>_
841 Each name in *status-columns* must have a corresponding *column-<name>*
842 setting. All *column-<name>* settings accept golang text/template
843 syntax.
844
845 By default, these columns are defined:
846
847 ```
848 column-left = [{{.Account}}] {{.StatusInfo}}
849 column-center = {{.PendingKeys}}
850 column-right = {{.TrayInfo}} | {{cwd}}
851 ```
852
853 See *aerc-templates*(7) for all available symbols and functions.
854
855 *separator* = _"<string>"_
856 Specifies the separator between grouped statusline elements (e.g. for
857 the _{{.ContentInfo}}_, _{{.TrayInfo}}_ and _{{.StatusInfo}}_ in
858 *column-<name>*).
859
860 Default: _" | "_
861
862 *display-mode* = _text_|_icon_
863 Defines the mode for displaying the status elements.
864
865 Default: _text_
866
867 # VIEWER
868
869 These options are configured in the *[viewer]* section of _aerc.conf_.
870
871 *pager* = _<command>_
872 Specifies the pager to use when displaying emails. Note that some filters
873 may add ANSI escape sequences to add color to rendered emails, so you may
874 want to use a pager which supports ANSI.
875
876 The following variables are defined in the pager command environment:
877
878 *AERC_MIME_TYPE*
879 the part MIME type/subtype
880 *AERC_FORMAT*
881 the part content type format= parameter (e.g. format=flowed)
882 *AERC_FILENAME*
883 the attachment filename (if any)
884 *AERC_SUBJECT*
885 the message Subject header value
886 *AERC_FROM*
887 the message From header value
888 *AERC_STYLESET*
889 the path to the styleset used by aerc
890 *AERC_OSC8_URLS*
891 set to _1_ when OSC 8 is enabled (see *enable-osc8*)
892
893 Default: _less -Rc_
894
895 *alternatives* = _<mime,types>_
896 If an email offers several versions (multipart), you can configure which
897 mimetype to prefer. For example, this can be used to prefer plaintext over
898 HTML emails.
899
900 Default: _text/plain,text/html_
901
902 *header-layout* = _<header|layout,list...>_
903 Defines the default headers to display when viewing a message. To display
904 multiple headers in the same row, separate them with a pipe, e.g. _From|To_.
905 Rows will be hidden if none of their specified headers are present in the
906 message.
907
908 Notmuch tags can be displayed by adding Labels.
909
910 Authentication information from the Authentication-Results header can be
911 displayed by adding _DKIM_, _SPF_ or _DMARC_. To show more information
912 than just the authentication result, append a plus sign (*+*) to the header name
913 (e.g. _DKIM+_).
914
915 Default: _From|To,Cc|Bcc,Date,Subject_
916
917 *show-headers* = _true_|_false_
918 Default setting to determine whether to show full headers or only parsed
919 ones in message viewer.
920
921 Default: _false_
922
923 *always-show-mime* = _true_|_false_
924 Whether to always show the mimetype of an email, even when it is just a single part.
925
926 Default: _false_
927
928 *max-mime-height* = _height_
929 Define the maximum height of the mimetype switcher before a scrollbar is
930 used. The height of the mimetype switcher is restricted to half of the display height.
931 If the provided value for the height is zero, the number of parts will
932 be used as the height of the type switcher.
933
934 Default: 0
935
936 *parse-http-links* = _true_|_false_
937 Parses and extracts http links when viewing a message. Links can then be
938 accessed with the *open-link* command.
939
940 Default: _true_
941
942 *html-inline-images* = _true_|_false_
943 Enable inlining of images referenced by _<img>_ tags with _cid:_ URLs
944 in HTML emails. When enabled, aerc will fetch image parts referenced by
945 their Content-ID and replace _cid:_ URLs with base64-encoded _data:_
946 URLs. This allows HTML emails with embedded images to be properly viewed
947 in browsers.
948
949 The feature works with all aerc commands that fetch message parts
950 (*:save*, *:open*, *:pipe*, and viewing).
951
952 For w3m, images will be displayed when using the *-sixel* option,
953 which requires *img2sixel*(1) to be installed. Make sure your
954 _text/html_ filter in *[filters]* is configured to use w3m with
955 appropriate image settings (e.g.: *text/html* = _! html -sixel_).
956
957 Default: _false_
958
959 ## CONTEXTUAL VIEWER CONFIGURATION
960
961 The viewer configuration can be specialized for senders and message
962 subjects. The specializations are added using contextual config
963 sections based on the context.
964
965 The contextual viewer configuration is merged to the base ViewerConfig
966 in the following order:
967 *Base ViewerConfig > Sender Context > From Context > Subject Context*.
968
969 *[viewer:sender=*_Address_*]*
970 Adds sender specific configuration for a specific envelope sender
971 email address.
972
973 *[viewer:sender~*_Regex_*]*
974 Adds sender specific configuration for envelope sender addresses which
975 match the regular expression.
976
977 *[viewer:from=*_Address_*]*
978 Adds sender specific configuration for a specific _From_ email address.
979
980 *[viewer:from~*_Regex_*]*
981 Adds sender specific configuration for _From_ names or addresses which
982 match the regular expression.
983
984 *[viewer:subject=*_Subject_*]*
985 Adds subject specific configuration for an exact message subject.
986
987 *[viewer:subject~*_Regex_*]*
988 Adds subject specific configuration for message subjects which match
989 the regular expression.
990
991 Example:
992 ```
993 [viewer:[email protected]]
994 alternatives=text/html,text/plain
995
996 [viewer:subject=Looks like links]
997 parse-http-links=false
998 ```
999
1000 # COMPOSE
1001
1002 These options are configured in the *[compose]* section of _aerc.conf_.
1003
1004 *editor* = _<command>_
1005 Specifies the command to run the editor with. It will be shown in an
1006 embedded terminal, though it may also launch a graphical window if the
1007 environment supports it.
1008
1009 The following variables are defined in the editor's environment:
1010
1011 *AERC_ACCOUNT*
1012 the name of the current account
1013 *AERC_ADDRESS_BOOK_CMD*
1014 the _address-book-cmd_ specified for the current account in
1015 _accounts.conf_
1016
1017 Defaults to *$VISUAL*, *$EDITOR*, or *vi*(1).
1018
1019 *header-layout* = _<header|layout,list...>_
1020 Defines the default headers to display when composing a message. To display
1021 multiple headers in the same row, separate them with a pipe, e.g. _To|From_.
1022
1023 Default: _To|From,Subject_
1024
1025 *edit-headers* = _true_|_false_
1026 Edit headers directly into the text editor instead of having separate UI
1027 text inputs.
1028
1029 When this is set to _true_, the *:cc*, *:bcc* and *:header* commands do
1030 not work, editing email headers are left to the text editor.
1031 *address-book-cmd* is not supported and address completion is left to
1032 the editor itself. *header-layout* is ignored.
1033
1034 Default: _false_
1035
1036 *focus-body* = _true_|_false_
1037 Sets focus to the email body when the composer window opens.
1038
1039 Default: _false_
1040
1041 *address-book-cmd* = _<command>_
1042 Specifies the command to be used to tab-complete email addresses. Any
1043 occurrence of _%s_ in _<command>_ will be replaced with anything the
1044 user has typed after the last comma. _<command>_ is executed using
1045 *sh -c*
1046
1047 The command must output the completions to standard output, one completion
1048 per line. Each line must be tab-delimited, with an email address occurring as
1049 the first field. Only the email address field is required. The second field,
1050 if present, will be treated as the contact name. Additional fields are
1051 ignored.
1052
1053 This parameter can also be set per account in _accounts.conf_.
1054
1055 Example with *carddav-query*(1):
1056 *address-book-cmd* = _carddav-query %s_
1057
1058 Example with *khard*(1):
1059 *address-book-cmd* = _khard email --remove-first-line --parsable %s_
1060
1061 Example with *maddr*(1) from *mblaze*:
1062 *address-book-cmd* = _maddr -ah to ~/Maildir/Sent | grep %s_
1063
1064 *file-picker-cmd* = _<command>_
1065 Specifies the command to be used to select attachments. Any occurrence of
1066 _%s_ in the *file-picker-cmd* will be replaced with the argument _<arg>_
1067 to *:attach -m* _<arg>_. Any occurrence of _%f_ will be replaced by the
1068 location of a temporary file, from which aerc will read the selected files.
1069
1070 If _%f_ is not present, the command must output the selected files to
1071 standard output, one file per line. If it is present, then aerc does not
1072 capture the standard output and instead reads the files from the temporary
1073 file which should have the same format.
1074
1075 Examples:
1076 - *file-picker-cmd* = _fzf --multi --query=%s_
1077 - *file-picker-cmd* = _ranger --choose-files=%f_
1078
1079 *reply-to-self* = _true_|_false_
1080 If set to _false_, do not mail yourself when replying (e.g., if replying
1081 to emails previously sent by yourself, address your replies to the
1082 original To and Cc).
1083
1084 Default: _true_
1085
1086 *empty-subject-warning* = _true_|_false_
1087 Warn before sending an email with an empty subject.
1088
1089 Default: _false_
1090
1091 *no-attachment-warning* = _<regexp>_
1092 Specifies a regular expression against which an email's body should be
1093 tested before sending an email with no attachment. If the regexp
1094 matches, aerc will warn you before sending the message. Leave empty to
1095 disable this feature.
1096
1097 Uses Go's regexp syntax, documented at https://golang.org/s/re2syntax.
1098 The _(?im)_ flags are set by default (case-insensitive and multi-line).
1099
1100 Example:
1101 *no-attachment-warning* = _^[^>]\*attach(ed|ment)_
1102
1103 *format-flowed* = _true_|_false_
1104 When set, aerc will generate _Format=Flowed_ bodies with a content type
1105 of _"text/plain; Format=Flowed"_ as described in RFC3676. This format is
1106 easier to handle for some mailing software, and generally just looks
1107 like ordinary text. To actually make use of this format's features,
1108 you'll need support in your editor.
1109
1110 Default: _false_
1111
1112 *lf-editor* = _true_|_false_
1113 By default, aerc will use RFC2822 standard _\\r\\n_ (CRLF) line breaks
1114 when composing messages. Use this option for text editors that only
1115 support non-standard _\\n_ (LF) line breaks.
1116
1117 Default: _false_
1118
1119 # MULTIPART CONVERTERS
1120
1121 Converters allow generating _multipart/alternative_ messages by converting the
1122 main _text/plain_ body into any other text MIME type with the *:multipart*
1123 command. Only exact MIME types are accepted. The commands are invoked with
1124 _sh -c_ and are expected to output valid UTF-8 text.
1125
1126 Only _text/<subtype>_ MIME parts can be generated. The _text/plain_ MIME type is
1127 reserved and cannot be generated. You still need to write your emails by hand in
1128 your favorite text editor.
1129
1130 Converters are configured in the *[multipart-converters]* section of
1131 _aerc.conf_.
1132
1133 Example:
1134
1135 ```
1136 [multipart-converters]
1137 text/html=pandoc -f markdown -t html --standalone
1138 ```
1139
1140 Obviously, this requires that you write your main _text/plain_ body using the
1141 markdown syntax. Also, mind that some mailing lists reject emails that contain
1142 _text/html_ alternative parts. Use this feature carefully and when possible,
1143 avoid using it at all.
1144
1145 # FILTERS
1146
1147 Filters are a flexible and powerful way of handling viewing parts of an opened
1148 message. When viewing messages aerc will show the list of available message
1149 parts and their MIME type at the bottom, but unless a filter is defined for
1150 a specific MIME type, it will only show a menu with a few options (allowing you
1151 to open the part in an external program, save it to disk or pipe it to a shell
1152 command). Configuring a filter will allow viewing the output of the filter in
1153 the configured *pager* in aerc's built-in terminal.
1154
1155 Filters are configured in the *[filters]* section of *aerc.conf*. The first
1156 filter which matches the part's MIME type will be used, so order them from most
1157 to least specific. You can also match on non-MIME types, by prefixing with the
1158 header to match against (non-case-sensitive) and a comma, e.g. _subject,text_
1159 will match a subject which contains _text_. Use _header,~regex_ to match
1160 against a _regex_. Using _.filename_ instead of a header will match against the
1161 filename of an attachment.
1162
1163 Note that aerc will pipe the content into the configured filter program, so
1164 filters need to be able to read from standard input. Many programs support
1165 reading from stdin by putting _-_ instead of a path to a file. You can also
1166 chain together multiple filters by piping with _|_.
1167
1168 Some filter commands may require interactive user input. If a filter command
1169 starts with an exclamation mark _!_, the configured *pager* will *not* be used.
1170 Instead, the filter command will be executed as the main process in the embedded
1171 terminal of the part viewer. The filter command standard input, output and error
1172 will be set to the terminal TTY. The filter is expected to implement its own
1173 paging.
1174
1175 aerc ships with some default filters installed in the libexec directory (usually
1176 _/usr/libexec/aerc/filters_). Note that these may have additional dependencies
1177 that aerc does not have alone.
1178
1179 The filter commands are invoked with _sh -c command_. The following folders are
1180 prepended to the system *$PATH* to allow referencing filters from their name only.
1181
1182 ```
1183 ${XDG_CONFIG_HOME:-~/.config}/aerc/filters
1184 ~/.local/libexec/aerc/filters
1185 ${XDG_DATA_HOME:-~/.local/share}/aerc/filters
1186 $PREFIX/libexec/aerc/filters
1187 $PREFIX/share/aerc/filters
1188 /usr/libexec/aerc/filters
1189 /usr/share/aerc/filters
1190 ```
1191
1192 If you want to run a program in your default *$PATH* which has the same
1193 name as a builtin filter (e.g. _/usr/bin/colorize_), use its absolute path.
1194
1195 The following variables are defined in the filter command environment:
1196
1197 *AERC_MIME_TYPE*
1198 the part MIME type/subtype
1199 *AERC_FORMAT*
1200 the part content type format= parameter (e.g. format=flowed)
1201 *AERC_FILENAME*
1202 the attachment filename (if any)
1203 *AERC_SUBJECT*
1204 the message Subject header value
1205 *AERC_FROM*
1206 the message From header value
1207 *AERC_STYLESET*
1208 the path to the styleset used by aerc
1209 *AERC_OSC8_URLS*
1210 set to _1_ when OSC 8 is enabled (see *enable-osc8*)
1211
1212 Note that said email body is converted into UTF-8 before being passed to
1213 filters.
1214
1215 If *show-headers* is enabled, only the currently viewed part body is piped into
1216 the filter command. A special _.headers_ filter command can be defined to post
1217 process the full headers.
1218
1219 ## EXAMPLES
1220
1221 _text/plain_
1222 Color some things, e.g. quotes, git diffs, links, etc.:
1223
1224 ```
1225 text/plain=colorize
1226 ```
1227
1228 The built-in _colorize_ filter can be configured in the *[viewer]*
1229 section of styleset files. See *aerc-stylesets*(7).
1230
1231 Wrap long lines at 100 characters, while not messing up nested quotes.
1232 Handles format=flowed emails properly:
1233
1234 ```
1235 text/plain=wrap -w 100 | colorize
1236 ```
1237
1238 _from,<sender>_
1239 Another example of hard wrapping lines of emails sent by a specific
1240 person. Explicitly reflow all paragraphs instead of only wrapping long
1241 lines. This may break manual formatting in some messages:
1242
1243 ```
1244 from,thatguywhoneverhardwrapshismessages=wrap -r -w 72 | colorize
1245 ```
1246
1247 _subject,~<regexp>_
1248 Use rainbow coloring with *lolcat*(1) for emails sent by software
1249 forges:
1250
1251 ```
1252 subject,~Git(hub|lab)=lolcat -f
1253 ```
1254
1255 _text/html_
1256 Render html to a more human readable version and colorize:
1257
1258 ```
1259 text/html=html | colorize
1260 ```
1261
1262 Use pandoc to output plain text:
1263
1264 ```
1265 text/html=pandoc -f html -t plain
1266 ```
1267
1268 Use w3m internal pager to interactively view an HTML part with coloring:
1269
1270 ```
1271 text/html=! w3m -I UTF-8 -T text/html
1272 ```
1273
1274 If *img2sixel*(1) is installed and your terminal emulator supports
1275 displaying images using the sixel protocol, use the builtin
1276 *html-unsafe* filter (to allow external URLs to be loaded) in
1277 interactive mode with explicit sixel inline images enabled.
1278
1279 ```
1280 text/html=! html-unsafe -sixel
1281 ```
1282
1283 _text/calendar_
1284 Parse calendar invites:
1285
1286 ```
1287 text/calendar=calendar
1288 ```
1289
1290 _text/\*_
1291 Catch any other type of text that did not have a specific filter and
1292 use *bat*(1) to color these:
1293
1294 ```
1295 text/\*=bat -fP --file-name="$AERC_FILENAME" --style=plain
1296 ```
1297
1298 _.headers_
1299 Colorize email headers when *show-headers* is _true_.
1300
1301 ```
1302 .headers=colorize
1303 ```
1304
1305 _message/delivery-status_
1306 When not being able to deliver the provider might send such emails:
1307
1308 ```
1309 message/delivery-status=colorize
1310 ```
1311
1312 _message/rfc822_
1313 When getting emails as attachments, e.g. on some mailing lists digest
1314 format is sending an email with all the digest emails as attachments.
1315 Requires *caeml*(1) to be on *PATH*:
1316
1317 ```
1318 message/rfc822=caeml | colorize
1319 ```
1320
1321 https://github.com/ferdinandyb/caeml
1322
1323 _application/mbox_
1324 Emails as attachments in the mbox format. For example aerc can also
1325 create an mbox from messages with the *:pipe* command. Requires
1326 *catbox*(1) and *caeml*(1) to be on *PATH*:
1327
1328 ```
1329 application/mbox=catbox -c caeml | colorize
1330 ```
1331
1332 https://github.com/konimarti/catbox
1333
1334 _application/pdf_
1335 Render pdf to text and rewrap at 100 character width. Requires
1336 *pdftotext*(1) to be on *PATH*:
1337
1338 ```
1339 application/pdf=pdftotext - -l 10 -nopgbrk -q - | fmt -w 100
1340 ```
1341
1342 https://www.xpdfreader.com/pdftotext-man.html
1343
1344 _image/\*_
1345
1346 This is a tricky topic. It's possible to display images in a terminal,
1347 but for high resolution images the terminal you are using either needs
1348 to support sixels or the kitty terminal graphics protocol. The built-in
1349 terminal emulator of aerc (via the TUI library Vaxis) supports both.
1350 Furthermore if you don't set any filter for images, Vaxis will figure
1351 out what your terminal emulator supports and either use sixels, kitty
1352 graphics, or fall back to a pixelated half-block. You can turn this
1353 feature off, by setting a filter that is essentially no-op.
1354
1355 You can still set a specific filter, e.g *catimg*(1):
1356
1357 ```
1358 image/\*=catimg -w$(tput cols) -
1359 ```
1360
1361 _.filename,~<regexp>_
1362 Match <regexp> against the filename of an attachment, e.g. to split
1363 csv-s into columns:
1364
1365 ```
1366 .filename,~.*\.csv=column -t --separator=","
1367 ```
1368
1369 See the wiki at https://man.sr.ht/~rjarry/aerc/ for more examples and possible
1370 customizations of the built-in filters.
1371
1372 # OPENERS
1373
1374 Openers allow you to specify the command to use for the *:open* and *:open-link*
1375 actions on a per-MIME-type basis. The *:open-link* URL scheme is used to
1376 determine the MIME type as follows: _x-scheme-handler/<scheme>_. They are
1377 configured in the *[openers]* section of _aerc.conf_.
1378
1379 _{}_ is expanded as the temporary filename or URL to be opened with proper shell
1380 quoting. If it is not encountered in the command, the filename/URL will be
1381 appended to the end of the command. The command will then be executed with
1382 _sh -c_.
1383
1384 Like *[filters]*, openers support basic shell globbing. The first opener which
1385 matches the part's MIME type (or URL scheme handler MIME type) will be used, so
1386 order them from most to least specific.
1387
1388 Example:
1389
1390 ```
1391 [openers]
1392 x-scheme-handler/irc=hexchat
1393 x-scheme-handler/http\*=printf '%s' {} | wl-copy
1394 text/html=surf -dfgms
1395 text/plain=gvim {} +125
1396 message/rfc822=thunderbird
1397 ```
1398
1399 # HOOKS
1400
1401 Hooks are triggered whenever the associated event occurs. The commands are run
1402 in a shell environment with information added to environment variables.
1403
1404 They are configured in the *[hooks]* section of aerc.conf.
1405
1406 *aerc-startup* = _<command>_
1407 Executed when aerc is started. The hook is executed as soon as the UI is
1408 initialized and does not wait for all accounts to be fully loaded.
1409
1410 Variables:
1411
1412 - *AERC_VERSION*
1413 - *AERC_BINARY*
1414
1415 Example:
1416
1417 *aerc-startup* = _aerc :terminal calcurse && aerc :next-tab_
1418
1419 *mail-received* = _<command>_
1420 Executed when new mail is received in the selected folder. This will
1421 only work reliably with maildir and some IMAP servers.
1422
1423 Variables:
1424
1425 - *AERC_ACCOUNT*
1426 - *AERC_ACCOUNT_BACKEND*
1427 - *AERC_FOLDER*
1428 - *AERC_FOLDER_ROLE*
1429 - *AERC_FROM_NAME*
1430 - *AERC_FROM_ADDRESS*
1431 - *AERC_SUBJECT*
1432 - *AERC_MESSAGE_ID*
1433
1434 Example:
1435
1436 *mail-received* = _notify-send "[$AERC_ACCOUNT/$AERC_FOLDER] New mail from $AERC_FROM_NAME" "$AERC_SUBJECT"_
1437
1438 *mail-deleted* = _<command>_
1439 Executed when a message is deleted from a folder. Note that this hook is
1440 triggered when moving a message from one folder to another.
1441
1442 Variables:
1443
1444 - *AERC_ACCOUNT*
1445 - *AERC_ACCOUNT_BACKEND*
1446 - *AERC_FOLDER*
1447 - *AERC_FOLDER_ROLE*
1448
1449 Example:
1450
1451 *mail-deleted* = _mbsync "$AERC_ACCOUNT:$AERC_FOLDER"_
1452
1453 *mail-added* = _<command>_
1454 Executed when a message is added to a folder. Note that this hook is not
1455 triggered when a new message is received (use *mail-received* for that) but
1456 rather is only triggered when aerc itself adds a message to a folder, e.g.
1457 when moving or copying a message.
1458
1459 Variables:
1460
1461 - *AERC_ACCOUNT*
1462 - *AERC_ACCOUNT_BACKEND*
1463 - *AERC_FOLDER*
1464 - *AERC_FOLDER_ROLE*
1465
1466 Example:
1467
1468 *mail-added* = _mbsync "$AERC_ACCOUNT:$AERC_FOLDER"_
1469
1470 *mail-sent* = _<command>_
1471 Executed when a message is sent. This does not necessarily signify
1472 successful posting, if a queueing system like msmtpq is used.
1473
1474 Variables:
1475
1476 - *AERC_ACCOUNT*
1477 - *AERC_ACCOUNT_BACKEND*
1478 - *AERC_FROM_NAME*
1479 - *AERC_FROM_ADDRESS*
1480 - *AERC_SUBJECT*
1481 - *AERC_TO*
1482 - *AERC_CC*
1483
1484 Example:
1485
1486 *mail-sent* = _`if [ "$AERC_ACCOUNT" = "gmail" ]; then mbsync
1487 gmail; fi`_
1488
1489 *aerc-shutdown* = _<command>_
1490 Executed when aerc shuts down. Aerc will wait for the command to finish
1491 before exiting.
1492
1493 Variables:
1494
1495 - *AERC_LIFETIME*
1496
1497 *tag-modified* = _<command>_
1498 Executed when notmuch tags are modified in a notmuch account. The list
1499 of added, removed and toggled tags are passed as variables.
1500
1501 Variables:
1502
1503 - *AERC_ACCOUNT*
1504 - *AERC_TAG_ADDED*
1505 - *AERC_TAG_REMOVED*
1506 - *AERC_TAG_TOGGLED*
1507
1508 *flag-changed* = _<command>_
1509 Executed when flags are changed on a message.
1510
1511 Variables:
1512
1513 - *AERC_ACCOUNT*
1514 - *AERC_ACCOUNT_BACKEND*
1515 - *AERC_FOLDER*
1516 - *AERC_FOLDER_ROLE*
1517 - *AERC_FLAG*
1518
1519 Example:
1520
1521 *flag-changed* = _mbsync "$AERC_ACCOUNT:$AERC_FOLDER"_
1522
1523 # TEMPLATES
1524
1525 Template files are used to populate the body of an email. The *:compose*,
1526 *:reply* and *:forward* commands can be called with the *-T* flag with the name
1527 of the template name. The available symbols and functions are described in
1528 *aerc-templates*(7).
1529
1530 aerc ships with some default templates installed in the share directory (usually
1531 _/usr/share/aerc/templates_).
1532
1533 These options are configured in the *[templates]* section of _aerc.conf_.
1534
1535 *template-dirs* = _<path1:path2:path3...>_
1536 The directory where the templates are stored. The config takes
1537 a colon-separated list of dirs. If this is unset or if a template cannot
1538 be found, the following paths will be used as a fallback in that order:
1539
1540 ```
1541 ${XDG_CONFIG_HOME:-~/.config}/aerc/templates
1542 ${XDG_DATA_HOME:-~/.local/share}/aerc/templates
1543 /usr/local/share/aerc/templates
1544 /usr/share/aerc/templates
1545 ```
1546
1547 *new-message* = _<template_name>_
1548 The default template to be used for new messages.
1549
1550 Default: _new_message_
1551
1552 *quoted-reply* = _<template_name>_
1553 The default template to be used for quoted replies.
1554
1555 Default: _quoted_reply_
1556
1557 *forwards* = _<template_name>_
1558 The default template to be used for forward as body.
1559
1560 Default: _forward_as_body_
1561
1562 # SEE ALSO
1563
1564 *aerc*(1) *aerc-accounts*(5) *aerc-binds*(5) *aerc-imap*(5) *aerc-jmap*(5)
1565 *aerc-maildir*(5) *aerc-notmuch*(5) *aerc-templates*(7) *aerc-sendmail*(5)
1566 *aerc-smtp*(5) *aerc-stylesets*(7) *carddav-query*(1)
1567
1568 # AUTHORS
1569
1570 Originally created by Drew DeVault and maintained by Robin Jarry who is assisted
1571 by other open source contributors. For more information about aerc development,
1572 see _https://sr.ht/~rjarry/aerc/_.