1aerc(1) General Commands Manual aerc(1)
2
3
4
6 aerc - the world's best email client
7
9 aerc [-v] [-a <account-name[,account-name]>] [mailto:...]
10
11 For a guided tutorial, use :help tutorial from aerc, or man aerc-tuto‐
12 rial from your terminal.
13
15 -v
16 Prints the installed version of aerc and exits.
17
18 -a <account-name[,account-name]>
19 Load only the named accounts, as opposed to all configured ac‐
20 counts. List must be comma separated, with no spaces. The account
21 order will be preserved.
22
23 mailto:address[,address][?query[&query]]
24 Opens the composer with the address(es) in the "to" field. These
25 addresses must not be percent encoded. If aerc is already running,
26 the composer is started in this instance, otherwise aerc will be
27 started. The following (optional) query parameters are supported:
28
29 ┌───────────────────────────┬────────────────────────────┐
30 │Query │ Description │
31 ├───────────────────────────┼────────────────────────────┤
32 │subject=<text> │ Subject line will be com‐ │
33 │ │ pleted with the text │
34 ├───────────────────────────┼────────────────────────────┤
35 │body=<text> │ Message body will be com‐ │
36 │ │ pleted with the text │
37 ├───────────────────────────┼────────────────────────────┤
38 │cc=<address[,address]> │ CC header will be com‐ │
39 │ │ pleted with the list of │
40 │ │ addresses │
41 ├───────────────────────────┼────────────────────────────┤
42 │bcc=<address[,address]> │ BCC header will be com‐ │
43 │ │ pleted with the list of │
44 │ │ addresses │
45 ├───────────────────────────┼────────────────────────────┤
46 │in-reply-to=<<message-id>> │ In-reply-to header will be │
47 │ │ set to the message id │
48 ├───────────────────────────┼────────────────────────────┤
49 │account=<accountname> │ Specify the account (must │
50 │ │ be in accounts.conf; de‐ │
51 │ │ fault is the selected ac‐ │
52 │ │ count) │
53 └───────────────────────────┴────────────────────────────┘
54 Note that reserved characters in the queries must be percent en‐
55 coded.
56
58 To execute a command, press ':' to bring up the command interface. Com‐
59 mands may also be bound to keys, see aerc-config(5) for details. In
60 some contexts, such as the terminal emulator, '<c-x>' is used to bring
61 up the command interface.
62
63 Different commands work in different contexts, depending on the kind of
64 tab you have selected.
65
66 Aerc stores a history of commands, which can be cycled through in com‐
67 mand mode. Pressing the up key cycles backwards in history, while
68 pressing down cycles forwards.
69
70 GLOBAL COMMANDS
71 These commands work in any context.
72
73 cd <directory>
74 Changes aerc's current working directory.
75
76 z <directory or zoxide query>
77 Changes aerc's current working directory using zoxide. If zoxide is
78 not on $PATH., the command will not be registered.
79
80 change-tab [+|-]<tab name or index> ct [+|-]<tab name or index>
81 Changes the focus to the tab with the given name. If a number is
82 given, it's treated as an index. If + or - is specified, the number
83 is interpreted as a delta from the selected tab.
84
85 exec <command...>
86 Executes an arbitrary command in the background. Aerc will set the
87 environment variables $account and $folder when the command is exe‐
88 cuted from an Account tab or an opened message.
89
90 Note: commands executed in this way are not executed with the
91 shell.
92
93 pwd
94 Displays aerc's current working directory in the status bar.
95
96 set <category>.<option> <value>
97 Changes the value of a configuration parameter at runtime. The cat‐
98 egory is the name of the [heading] for the config option you wish
99 to change, and the option is the name of the config option. For ex‐
100 ample, to change this option:
101
102 [ui]
103 index-format=before
104
105 Use :set ui.index-format after.
106
107 term [command...] terminal
108 Opens a new terminal tab with a shell running in the current work‐
109 ing directory, or the specified command.
110
111 move-tab [+|-]<index>
112 Moves the selected tab to the given index. If + or - is specified,
113 the number is interpreted as a delta from the selected tab.
114
115 prev-tab [n], next-tab [n]
116 Cycles to the previous or next tab in the list, repeating n times
117 (default: 1).
118
119 pin-tab
120 Moves the current tab to the left of all non-pinned tabs and dis‐
121 plays the pinned-tab-marker (default: `) to the left of the tab ti‐
122 tle.
123
124 unpin-tab
125 Removes the pinned-tab-marker from the current tab and returns the
126 tab to its previous location.
127
128 prompt <prompt> <command...>
129 Displays the prompt on the status bar, waits for user input, then
130 appends that input as the last argument to the command and executes
131 it. The input is passed as one argument to the command, unless it
132 is empty, in which case no extra argument is added.
133
134 choose -o <key> <text> <command> [-o <key> <text> <command>]...
135 Prompts the user to choose from various options.
136
137 quit [-f] exit [-f]
138 Exits aerc. If a task is being performed that should not be inter‐
139 rupted (like sending a message), a normal quit call might fail. In
140 this case, closing aerc can be forced with the -f option.
141
142 MESSAGE COMMANDS
143 These commands are valid in any context that has a selected message
144 (e.g. the message list, the message in the message viewer, etc).
145
146 archive <scheme>
147 Moves the selected message to the archive. The available schemes
148 are:
149
150 flat: No special structure, all messages in the archive directory
151
152 year: Messages are stored in folders per year
153
154 month: Messages are stored in folders per year and subfolders per
155 month
156
157 accept
158 Accepts an iCalendar meeting invitation.
159
160 accept-tentative
161 Accepts an iCalendar meeting invitation tentatively.
162
163 copy <target> cp <target>
164 Copies the selected message to the target folder.
165
166 decline
167 Declines an iCalendar meeting invitation.
168
169 delete delete-message
170 Deletes the selected message.
171
172 recall [-f]
173 Opens the selected message for re-editing. Messages can only be re‐
174 called from the postpone directory. The original message is
175 deleted.
176
177 -f: Open the message for re-editing even if it is not in the post‐
178 pone directory. The original message will be deleted only if it is
179 in the postpone directory.
180
181 forward [-A | -F] [-T <template-file>] [address...]
182 Opens the composer to forward the selected message to another re‐
183 cipient.
184
185 -A: Forward the message and all attachments.
186
187 -F: Forward the full message as an RFC 2822 attachment.
188
189 -T <template-file>
190 Use the specified template file for creating the initial mes‐
191 sage body. Unless -F is specified, this defaults to what is set
192 as forwards in the [templates] section of aerc.conf.
193
194 move <target> mv <target>
195 Moves the selected message to the target folder.
196
197 pipe [-bmp] <cmd>
198 Downloads and pipes the selected message into the given shell com‐
199 mand, and opens a new terminal tab to show the result. By default,
200 the selected message part is used in the message viewer and the
201 full message is used in the message list.
202
203 Operates on multiple messages when they are marked. When piping
204 multiple messages, aerc will write them with mbox format separa‐
205 tors.
206
207 -b: Run the command in the background instead of opening a terminal
208 tab
209
210 -m: Pipe the full message
211
212 -p: Pipe just the selected message part, if applicable
213
214 reply [-aq] [-T <template-file>]
215 Opens the composer to reply to the selected message.
216
217 -a: Reply all
218
219 -q: Insert a quoted version of the selected message into the reply
220 editor
221
222 -T <template-file>
223 Use the specified template file for creating the initial mes‐
224 sage body. If -q is specified, defaults to what is set as
225 quoted-reply in the [templates] section of aerc.conf.
226
227 read [-t]
228 Marks the marked or selected messages as read.
229
230 -t: Toggle the messages between read and unread.
231
232 unread [-t]
233 Marks the marked or selected messages as unread.
234
235 -t: Toggle the messages between read and unread.
236
237 flag [-t] [-a | -x <flag>]
238 Sets (enables) a certain flag on the marked or selected messages.
239
240 -t: Toggle the flag instead of setting (enabling) it.
241
242 -a: Mark message as answered/unanswered.
243
244 -x <flag>: Mark message with specific flag.
245
246 The available flags are (adapted from RFC 3501, section 2.3.2):
247
248 Seen
249 Message has been read
250 Answered
251 Message has been answered
252 Flagged
253 Message is flagged for urgent/special attention
254
255 unflag [-t] <flag>
256 Operates exactly like flag, defaulting to unsetting (disabling)
257 flags.
258
259 modify-labels <[+-]label>... tag <[+-]label>...
260 Modify message labels (e.g. notmuch tags). Labels prefixed with a
261 '+' are added, those prefixed with a '-' removed. As a convenience,
262 labels without either operand add the specified label.
263
264 Example: `modify-labels +inbox -spam unread` adds the labels inbox
265 and unread and removes spam
266
267 unsubscribe
268 Attempt to automatically unsubscribe the user from the mailing list
269 through use of the List-Unsubscribe header. If supported, aerc may
270 open a compose window pre-filled with the unsubscribe information
271 or open the unsubscribe URL in a web browser.
272
273 MESSAGE LIST COMMANDS
274 clear [-s]
275 Clears the current search or filter criteria.
276
277 By default, the selected message will be kept. To clear the se‐
278 lected message and move cursor to the top of the message list, use
279 the -s flag.
280
281 -s
282 Selects the message at the top of the message list after clear‐
283 ing.
284
285 cf <folder>
286 Change the folder shown in the message list.
287
288 check-mail
289 Check for new mail on the selected account. Non-imap backends re‐
290 quire check-mail-cmd to be set in order for aerc to initiate a
291 check for new mail. Issuing a manual :check-mail command will reset
292 the timer for automatic checking.
293
294 compose [-H] [<body>] [-T <template-file>]
295 Open the compose window to send a new email. The new email will be
296 sent with the current account's outgoing transport configuration.
297 For details on configuring outgoing mail delivery consult aerc-con‐
298 fig(5).
299
300 -H <header>
301 Add the specified header to the message, e.g. 'compose -H "X-
302 Custom: custom value"'
303 -T <template-file>
304 Use the specified template file for creating the initial mes‐
305 sage body.
306
307 filter [options] <terms...>
308 Similar to search, but filters the displayed messages to only the
309 search results. See the documentation for search for more details.
310
311 mkdir <name>
312 Creates a new folder for this account and changes to that folder.
313
314 This is not supported on the 'notmuch' backend.
315
316 rmdir [-f]
317 Removes the current folder.
318
319 By default, it will fail if the directory is non-empty (see -f).
320
321 -f
322 Remove the directory even if it contains messages.
323
324 This is not supported on the 'notmuch' backend.
325
326 Some programs that sync maildirs may recover deleted directories
327 (e.g. offlineimap). These can either be specially configured to
328 properly handle directory deletion, or special commands need to be
329 run to delete directories (e.g. 'offlineimap --delete-folder').
330
331 It is possible, with a slow connection and the 'imap' backend, that
332 new messages arrive in the directory before they show up - using
333 'rmdir' at this moment would delete the directory and such new mes‐
334 sages before the user sees them.
335
336 next <n>[%], prev <n>[%] next-message <n>[%], prev-message <n>[%]
337 Selects the next (or previous) message in the message list. If
338 specified as a percentage, the percentage is applied to the number
339 of messages shown on screen and the cursor advances that far.
340
341 next-folder <n>, prev-folder <n>
342 Cycles to the next (or previous) folder shown in the sidebar, re‐
343 peated n times (default: 1).
344
345 expand-folder, collapse-folder
346 Expands or collapses the current folder when the directory tree is
347 enabled.
348
349 export-mbox <file>
350 Exports all messages in the current folder to an mbox file.
351
352 import-mbox <file>
353 Imports all messages from an mbox file to the current folder.
354
355 next-result, prev-result
356 Selects the next or previous search result.
357
358 search
359 Searches the current folder. The search syntax is dependent on the
360 underlying backend. Refer to aerc-search(1) for details
361
362 select <n> select-message <n>
363 Selects the nth message in the message list (and scrolls it into
364 view if necessary).
365
366 split [+|-] [<n>]
367 Creates a horizontal split, showing a <n> messages and a message
368 view below the message list. If a + or - is prepended, the message
369 list size will grow or shrink accordingly. The split can be cleared
370 by calling :split 0, or just :split. The split can be toggled by
371 calling split with the same size repeatedly. For example, :split 10
372 will create a split. Calling :split 10 again will remove the split.
373 Also see vsplit
374
375 sort [[-r] <criterion>]...
376 Sorts the message list by the given criteria. -r sorts the immedi‐
377 ately following criterion in reverse order.
378
379 Available criteria:
380
381 ┌──────────┬───────────────────────────┐
382 │Criterion │ Description │
383 ├──────────┼───────────────────────────┤
384 │arrival │ Date and time of the mes‐ │
385 │ │ sages arrival │
386 ├──────────┼───────────────────────────┤
387 │cc │ Addresses in the "cc" │
388 │ │ field │
389 ├──────────┼───────────────────────────┤
390 │date │ Date and time of the mes‐ │
391 │ │ sage │
392 ├──────────┼───────────────────────────┤
393 │from │ Addresses in the "from" │
394 │ │ field │
395 ├──────────┼───────────────────────────┤
396 │read │ Presence of the read flag │
397 ├──────────┼───────────────────────────┤
398 │size │ Size of the message │
399 ├──────────┼───────────────────────────┤
400 │subject │ Subject of the message │
401 ├──────────┼───────────────────────────┤
402 │to │ Addresses in the "to" │
403 │ │ field │
404 └──────────┴───────────────────────────┘
405 toggle-threads
406 Toggles between message threading and the normal message list.
407
408 view [-p] view-message [-p]
409 Opens the message viewer to display the selected message. If the
410 peek flag -p is set, the message will not be marked as "seen" and
411 ignores the "auto-mark-read" config.
412
413 vsplit [+|-] [<n>]
414 Creates a vertical split of the message list. The message list will
415 be <n> columns wide, and a vertical message view will be shown to
416 the right of the message list. If a + or - is prepended, the mes‐
417 sage list size will grow or shrink accordingly. The split can be
418 cleared by calling :vsplit 0, or just :vsplit. The split can be
419 toggled by calling split with the same size repeatedly. For exam‐
420 ple, :vsplit 10 will create a split. Calling :vsplit 10 again will
421 remove the split. Also see split
422
423 MESSAGE VIEW COMMANDS
424 close
425 Closes the message viewer.
426
427 next <n>[%], prev <n>[%]
428 Selects the next (or previous) message in the message list. If
429 specified as a percentage, the percentage is applied to the number
430 of messages shown on screen and the cursor advances that far.
431
432 next-part, prev-part
433 Cycles between message parts being shown. The list of message parts
434 is shown at the bottom of the message viewer.
435
436 open [args...]
437 Saves the current message part to a temporary file, then opens it.
438 If no arguments are provided, it will open the current MIME part
439 with the matching command in the [openers] section of aerc.conf.
440 When no match is found in [openers], it falls back to the default
441 system handler.
442
443 When arguments are provided:
444
445 • The first argument must be the program to open the message part
446 with. Subsequent args are passed to that program.
447 • {} will be expanded as the temporary filename to be opened. If
448 it is not encountered in the arguments, the temporary filename
449 will be appened to the end of the command.
450
451
452 save [-fpa] <path>
453 Saves the current message part to the given path. If the path is
454 not an absolute path, general.default-save-path will be prepended
455 to the path given. If path ends in a trailing slash or if a folder
456 exists on disc or if -a is specified, aerc assumes it to be a di‐
457 rectory. When passed a directory :save infers the filename from the
458 mail part if possible, or if that fails, uses "aerc_$DATE".
459
460 -f: Overwrite the destination whether or not it exists
461
462 -p: Create any directories in the path that do not exist
463
464 -a: Save all attachments. Individual filenames cannot be specified.
465
466 mark [-atvT]
467 Marks messages. Commands will execute on all marked messages in‐
468 stead of the highlighted one if applicable. The flags below can be
469 combined as needed.
470
471 -a: Apply to all messages in the current folder
472
473 -t: toggle the mark state instead of marking a message
474
475 -v: Enter / leave visual mark mode
476
477 -V: Same as -v but does not clear existing selection
478
479 -T: Marks the displayed message thread of the selected message.
480
481 unmark [-at]
482 Unmarks messages. The flags below can be combined as needed.
483
484 -a: Apply to all messages in the current folder
485
486 -t: toggle the mark state instead of unmarking a message
487
488 remark
489 Re-select the last set of marked messages. Can be used to chain
490 commands after a selection has been acted upon
491
492 MESSAGE COMPOSE COMMANDS
493 abort
494 Close the composer without sending, discarding the message in
495 progress.
496
497 attach <path>
498 Attaches the file at the given path to the email. The path can con‐
499 tain globbing syntax described at
500 https://godocs.io/path/filepath#Match.
501
502 attach-key
503 Attaches the public key for the configured account to the email.
504
505 detach [path]
506 Detaches the file with the given path from the composed email. If
507 no path is specified, detaches the first attachment instead.
508
509 cc [addresses], bcc [addresses]
510 Sets the Cc or Bcc header to the given addresses. If an editor for
511 the header is not currently visible in the compose window, a new
512 one will be added.
513
514 edit
515 (Re-) opens your text editor to edit the message in progress.
516
517 next-field, prev-field
518 Cycles between input fields in the compose window.
519
520 postpone
521 Saves the current state of the message to the postpone folder for
522 the current account.
523
524 save [-p] <path>
525 Saves the selected message part to the specified path. If -p is se‐
526 lected, aerc will create any missing directories in the specified
527 path. If the path specified is a directory or ends in /, aerc will
528 use the attachment filename if available or a generated name if
529 not.
530
531 send
532 Sends the message using this accounts default outgoing transport
533 configuration. For details on configuring outgoing mail delivery
534 consult aerc-config(5).
535
536 switch-account <-n|-p|account-name>
537 Switches the account. Can be used to switch to a specific account
538 from its name or to cycle through accounts using the -p and -n
539 flags.
540
541 -p: switch to previous account -n: switch to next account
542
543 header [-f] <field> [value]
544 Add a new email header. If the header already exists, -f must be
545 specified to replace the given value.
546
547 toggle-headers
548 Toggles the visibility of the message headers.
549
550 TERMINAL COMMANDS
551 close
552 Closes the terminal.
553
555 Aerc does not log by default, but collecting log output can be useful
556 for troubleshooting and reporting issues. Redirecting stdout when in‐
557 voking aerc will write log messages to that file:
558
559 $ aerc > log
560
562 aerc-config(5) aerc-imap(5) aerc-smtp(5) aerc-maildir(5) aerc-send‐
563 mail(5) aerc-tutorial(7)
564
566 Originally created by Drew DeVault <sir@cmpwn.com> and maintained by
567 Robin Jarry <robin@jarry.cc> who is assisted by other open source con‐
568 tributors. For more information about aerc development, see
569 https://sr.ht/~rjarry/aerc/.
570
571
572
573 2022-11-02 aerc(1)