File: neomuttrc.man.head

package info (click to toggle)
neomutt 20250510%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 23,372 kB
  • sloc: ansic: 171,730; sh: 5,357; perl: 1,121; tcl: 1,065; python: 443; makefile: 48
file content (1480 lines) | stat: -rw-r--r-- 51,398 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
'\" t
.\" -*- nroff -*-
.\"
.\"     Copyright (C) 2015-2024 Richard Russon <rich@flatcap.org>
.\"
.\"     This program is free software; you can redistribute it and/or modify
.\"     it under the terms of the GNU General Public License as published by
.\"     the Free Software Foundation; either version 2 of the License, or
.\"     (at your option) any later version.
.\"
.\"     This program is distributed in the hope that it will be useful,
.\"     but WITHOUT ANY WARRANTY; without even the implied warranty of
.\"     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
.\"     GNU General Public License for more details.
.\"
.\"     You should have received a copy of the GNU General Public License
.\"     along with this program; if not, write to the Free Software
.\"     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
.\"
.de EX
.nf
.ft CW
..
.de EE
.ft
.fi
..
.TH neomuttrc 5 "@MAN_DATE@" Unix "User Manuals"
.\" --------------------------------------------------------------------
.SH NAME
.\" --------------------------------------------------------------------
neomuttrc \- Configuration file for the NeoMutt Mail User Agent (MUA)
.
.\" --------------------------------------------------------------------
.SH DESCRIPTION
.\" --------------------------------------------------------------------
.PP
A NeoMutt configuration file consists of a series of \(lqcommands\(rq. Each
line of the file may contain one or more commands. When multiple commands are
used, they must be separated by a semicolon (\(lq\fB;\fP\(rq).
.
.PP
The hash mark, or pound sign (\(lq\fB#\fP\(rq), is used as a \(lqcomment\(rq
character. You can use it to annotate your initialization file. All text after
the comment character to the end of the line is ignored.
.
.PP
Single quotes (\(lq\fB\(aq\fP\(rq) and double quotes (\(lq\fB\(dq\fP\(rq) can
be used to quote strings which contain spaces or other special characters. The
difference between the two types of quotes is similar to that of many popular
shell programs, namely that a single quote is used to specify a literal string
(one that is not interpreted for shell variables or quoting with a backslash
[see next paragraph]), while double quotes indicate a string which should be
evaluated. For example, backticks are evaluated inside of double quotes, but
not single quotes.
.
.PP
\(lq\fB\(rs\fP\(rq quotes the next character, just as in shells such as Bash
and Zsh. For example, if you want to put quotes (\(lq\fB\(dq\fP\(rq) inside of
a string, you can use \(lq\fB\(rs\fP\(rq to force the next character to be
a literal instead of interpreted character.
.
.PP
\(lq\fB\(rs\(rs\fP\(rq means to insert a literal \(lq\fB\(rs\fP\(rq into the
line. \(lq\fB\(rsn\fP\(rq and \(lq\fB\(rsr\fP\(rq have their usual C meanings
of line feed (LF) and carriage return (CR), respectively.
.
.PP
A \(lq\fB\(rs\fP\(rq at the end of a line can be used to split commands over
multiple lines, provided that the split points don't appear in the middle of
command names.
.
.PP
It is also possible to substitute the output of a Unix command in an
initialization file. This is accomplished by enclosing the command in backticks
(\fB\(ga\fP\fIcommand\fP\fB\(ga\fP).
.
.PP
Unix environment variables can be accessed like the way it is done in shells
like sh and Bash: Prepend the name of the variable by a dollar
(\(lq\fB\(Do\fP\(rq) sign.
.
.\" --------------------------------------------------------------------
.SH COMMANDS
.\" --------------------------------------------------------------------
.SS "\s-1Configuration Commands\s0"
.\" --------------------------------------------------------------------
.PP
The following are the commands understood by NeoMutt:
.
.PP
.nf
\fBaccount-hook\fP \fIregex\fP \fIcommand\fP
.fi
.IP
This hook is executed whenever you access a remote mailbox. Useful to adjust
configuration settings to different IMAP or POP servers.
.
.PP
.nf
\fBalias\fP [ \fB\-group\fP \fIname\fP ... ] \fIkey\fP \fIaddress\fP [\fB,\fP \fIaddress\fP ... ]
\fBunalias\fP [ \fB\-group\fP \fIname\fP ... ] { \fB*\fP | \fIkey\fP ... }
.fi
.IP
\fBalias\fP defines a surrogate \fIkey\fP for the given address(es). Each
\fIaddress\fP will be resolved into either an email address
(user@\:example.com) or a named email address (User Name <user@\:example.com>).
The address may be specified in either format, or in the format
\(lquser@\:example.com (User Name)\(rq.
.IP
\fBNote\fP: If you want to create an alias for more than one address, you
\fBmust\fP separate the addresses with a comma (\(lq\fB,\fP\(rq).
.IP
\fBunalias\fP removes the alias corresponding to the given \fIkey\fP or all
aliases when \(lq\fB*\fP\(rq is used as an argument.
.IP
The optional \fB\-group\fP flag causes the address(es) to be added to or
removed from the \fIname\fPd group.
.
.PP
.nf
\fBalternates\fP [ \fB\-group\fP \fIname\fP ... ] \fIregex\fP [ \fIregex\fP ... ]
\fBunalternates\fP [ \fB\-group\fP \fIname\fP ... ] { \fB*\fP | \fIregex\fP ... }
.fi
.IP
\fBalternates\fP is used to inform NeoMutt about alternate addresses where you
receive mail; you can use regular expressions (\fIregex\fP) to specify
alternate addresses. This affects NeoMutt's idea about messages from you, and
messages addressed to you.
.IP
\fBunalternates\fP can be used to write exceptions to alternates regular
expression. To remove a regular expression from the alternates list, use the
unalternates command with exactly the same \fIregex\fP or use \(lq\fB*\fP\(rq
to remove all entries.
.IP
The optional \fB\-group\fP flag causes all of the subsequent regular expressions
to be added to or removed from the \fIname\fPd group.
.
.PP
.nf
\fBalternative_order\fP \fImime-type\fP[/\fImime-subtype\fP] [ \fImime-type\fP[/\fImime-subtype\fP] ... ]
\fBunalternative_order\fP { \fB*\fP | \fImime-type\fP[/\fImime-subtype\fP] ... }
.fi
.IP
\fBalternative_order\fP command permits you to define an order of preference
that is used by NeoMutt to determine which part of
a \fBmultipart/\:alternative\fP body to display. A \fImime-subtype\fP of
\(lq\fB*\fP\(rq matches any \fBmultipart/\:alternative\fP subtype, as does an
empty \fImime-subtype\fP.
.IP
\fBunalternative_order\fP removes entries from the ordered list or deletes the
entire list when \(lq\fB*\fP\(rq is used as an argument.
.
.PP
.nf
\fBattachments\fP { \fB+\fP | \fB\-\fP }\fIdisposition\fP \fImime-type\fP [ \fImime-type\fP ... ]
\fBunattachments\fP { \fB+\fP | \fB\-\fP }\fIdisposition\fP \fImime-type\fP [ \fImime-type\fP ... ]
\fBattachments\fP \fB?\fP
\fBunattachments\fP \fB*\fP
.fi
.IP
You can make your message index display the number of qualifying attachments in
each message, or search for messages by attachment count. You also can
configure what kinds of attachments qualify for this feature with the
\fBattachments\fP and \fBunattachments\fP commands.
.IP
\fIdisposition\fP is the attachment's Content-Disposition type \(em either
\fBinline\fP or \fBattachment\fP. You can abbreviate this to \fBI\fP or
\fBA\fP.
.IP
Disposition is prefixed by either a \fB+\fP symbol or a \fB-\fP symbol. If it's
a \fB+\fP, you're saying that you want to allow this disposition and MIME type
to qualify. If it's a \fB-\fP, you're saying that this disposition and MIME
type is an exception to previous \fB+\fP rules.
.IP
\fImime-type\fP is the MIME type of the attachment you want the command to
affect. A MIME type is always of the format \fBmajor/minor\fP. The major part
of \fImime-type\fP must be literal text (or the special token \(lq\fB*\fP\(rq,
but the minor part may be a regular expression. Therefore, \(lq\fB*/.*\fP\(rq
matches any MIME type.
.IP
Note that the first MIME part is treated slightly differently: It is almost
always the message text.  Thus, it is not counted as an attachment if its
disposition is \fBinline\fP and it is not a \fBmultipart/*\fP or
\fBmessage/*\fP MIME-type.
.IP
Entering the command \(lq\fBattachments ?\fP\(rq as a command will list your
current settings in neomuttrc format, so that it can be pasted elsewhere.
.IP
Entering the command \(lq\fBunattachments *\fP\(rq as a command will Clear all
attachment settings.
.
.PP
.nf
\fBauto_view\fP \fImime-type\fP[\fB/\fP\fImime-subtype\fP] [ \fImime-type\fP[\fB/\fP\fImime-subtype\fP] ... ]
\fBunauto_view\fP { \fB*\fP | \fImime-type\fP[\fB/\fP\fImime-subtype\fP] ... }
.fi
.IP
This commands permits you to specify that NeoMutt should automatically convert
the given \fImime-type\fPs to text/plain when displaying messages. For this to work,
there must be a
.BR mailcap (5)
entry for the given \fImime-type\fP with the \fBcopiousoutput\fP option set.
A \fImime-subtype\fP of \(lq\fB*\fP\(rq matches any
\fBmultipart/\:alternative\fP subtype, as does an empty \fImime-subtype\fP.
.
.PP
.nf
\fBbind\fP \fImap\fP[\fB,\fP\fImap\fP ... ] \fIkey\fP \fIfunction\fP
\fBunbind\fP { \fB*\fP | \fImap\fP | [\fB,\fP\fImap\fP...]} [ \fIkey\fP ]
.fi
.IP
This command allows you to change the default or define additional key bindings
(operation invoked when pressing a key).
.IP
\fImap\fP specifies in which menu the binding belongs. Multiple \fImap\fPs may
be specified by separating them with commas (no additional whitespace is
allowed). The currently defined \fImap\fPs are:
.BR alias ", " attach ", " browser ", " compose ", " editor ", " generic ", "
.BR index ", " mix ", " pager ", " pgp ", " postpone ", " query " and " smime "."
.IP
\fIkey\fP is the key (or key sequence) you wish to bind, e.g.
\(lq\fB\(rsCa\fP\(rq for control-A. In addition, \fIkey\fP may be specified as
a three digit octal number prefixed with a \(lq\fB\(rs\fP\(rq or as a symbolic
name. The \fB<what-key>\fP function can be used to explore keycode and
symbolic names for the keys on your keyboard.
.IP
\fIfunction\fP specifies which action to take when key is pressed. Note that
the function name is to be specified without angle brackets.
.IP
Missing key sequence in \fBunbind\fP command means unbind all bindings in menus given in \fImap\fP .
.IP
For more information on keys and functions, please consult the NeoMutt manual.
.
.PP
.nf
\fBcharset-hook\fP \fIalias\fP \fIcharset\fP
\fBiconv-hook\fP \fIcharset\fP \fIlocal-charset\fP
.fi
.IP
\fBcharset-hook\fP defines an \fIalias\fP for a character set. This is useful to
properly display messages which are tagged with a character set name not known
to NeoMutt.
.IP
\fBiconv-hook\fP defines a system-specific name for a character set. This is
useful when your system's
.BR iconv (3)
implementation does not understand MIME character set names (such as
\fBiso-8859-1\fP), but instead insists on being fed with
implementation-specific character set names (such as \fB8859-1\fP). In this
specific case, you'd put \(lq\fBiconv-hook\fP\~iso-8859-1\~8859-1\(rq into your
configuration file.
.
.PP
.nf
\fBcolor\fP \fIobject\fP [ \fIattribute\fP ... ] \fIforeground\fP \fIbackground\fP
\fBcolor\fP { header | body } [ \fIattribute\fP ... ] \fIforeground\fP \fIbackground\fP \fIregex\fP
\fBcolor\fP status \fIforeground\fP \fIbackground\fP [\fIregex\fP [ \fInum\fP ]]
\fBcolor\fP index-object [ \fIattribute\fP ... ] \fIforeground\fP \fIbackground\fP \fIpattern\fP
\fBcolor\fP \fIcompose-object\fP \fIforeground\fP \fIbackground\fP
\fBcolor\fP \fIcompose-object\fP [ \fIattribute\fP ... ] \fIforeground\fP \fIbackground\fP
\fBuncolor\fP { index-object | header | body } { \fB*\fP | \fIpattern\fP ... }
.fi
.IP
If your terminal supports color, these commands can be used to assign
\fIforeground\fP/\:\fIbackground\fP combinations to certain \fIobject\fPs. The
currently defined \fIobject\fPs are:
.BR attach_\:headers ", "
.BR attachment ", "
.BR body ", "
.BR bold ", "
.BR error ", "
.BR hdrdefault ", "
.BR header ", "
.BR index ", "
.BR index_\:author ", "
.BR index_\:collapsed ", "
.BR index_\:date ", "
.BR index_\:flags ", "
.BR index_\:label ", "
.BR index_\:number ", "
.BR index_\:size ", "
.BR index_\:subject ", "
.BR index_\:tag ", "
.BR index_\:tags ", "
.BR indicator ", "
.BR markers ", "
.BR message ", "
.BR normal ", "
.BR progress ", "
.BR prompt ", "
.BR quoted ", "
.BR quoted\fIN\fP ", "
.BR search ", "
.BR signature ", "
.BR status ", "
.BR stripe_even ", "
.BR stripe_odd ","
.BR tilde ", "
.BR tree ", "
.BR underline "."
.IP
If the sidebar is enabled the following \fIobject\fPs are also valid:
.BR sidebar_\:background ", "
.BR sidebar_\:divider ", "
.BR sidebar_\:flagged ", "
.BR sidebar_\:highlight ", "
.BR sidebar_\:indicator ", "
.BR sidebar_\:new ", "
.BR sidebar_\:ordinary ", "
.BR sidebar_\:spool_file "."
.IP
The \fBbody\fP and \fBheader\fP objects allow you to restrict the colorization
to a regular expression. The \fBindex-object\fP permits you to select colored
messages by pattern.
.IP
The \fBheader\fP and \fBbody\fP match \fIregex\fP in the header/body of
a message, \fBindex-object\fP can match \fIpattern\fP in the message index.
Note that IMAP server-side searches (=b, =B, =h) are not supported for color
index patterns.
.IP
The \fBstatus\fP object optionally takes an regex and a match number.  If the
regex is given, only the matching parts are colored.  If additionally the match
number is given, only that sub-match of the regex is colored.
.IP
Valid compose-objects include
.BR compose_header ", " compose_security_encrypt ", " compose_security_sign ", "
.BR compose_security_both ", " compose_security_none .
.IP
Valid colors include:
.BR default ", "
.BR black ", "
.BR red ", "
.BR green ", "
.BR yellow ", "
.BR blue ", "
.BR magenta ", "
.BR cyan ", "
.BR white ", "
.BR #\fIRRGGBB\fP ", "
.BR color\fIN\fP "."
.IP
Valid attributes include:
.BR none ", " bold ", " underline ", "
.BR reverse ", and " standout .
.IP
The \fBuncolor\fP command can be applied to the index, header and body objects
only. It removes entries from the list. You must specify the same \fIpattern\fP
specified in the \fBcolor\fP command for it to be removed. The pattern
\(lq\fB*\fP\(rq is a special token which means to clear the color list of all
entries.
.IP
For further information on colorization, please consult the NeoMutt manual.
.
.PP
.nf
\fBcrypt-hook\fP \fIregex\fP \fIkeyid\fP
.fi
.IP
The crypt-hook command provides a method by which you can specify the ID of the
public key to be used when encrypting messages to a certain recipient. The
meaning of \fIkeyid\fP is to be taken broadly: This can be a different email
address, a numerical \fIkeyid\fP, or even just an arbitrary search string. You
may use multiple \fBcrypt-hook\fPs with the same \fIregex\fP; multiple matching
\fBcrypt-hook\fPs result in the use of multiple \fIkeyid\fPs for a recipient.
.TP
\fBindex-format-hook\fP \fIname\fP [\fB!\fP]\fIpattern\fP \fIformat-string\fP
This command is used to inject format strings dynamically into
$index_format based on pattern matching against the current message.
.IP
The $index_format expando \fI%@name@\fP specifies a placeholder for
the injection. Index-format-hooks with the same \fIname\fP are matched
using \fIpattern\fP against the current message. Matching is done in
the order specified in the .neomuttrc, with the first match being
used. The hook's \fIformat-string\fP is then substituted and evaluated.
.
.PP
.nf
\fBexec\fP \fIfunction\fP [ \fIfunction\fP ... ]
.fi
.IP
This command can be used to execute any \fIfunction\fP. Functions are listed in
the function reference. \(lq\fBexec\fP \fIfunction\fP\(rq is equivalent to
\(lq\fBpush\fP <\fIfunction\fP>\(rq.
.
.PP
.nf
\fBfcc-save-hook\fP \fIpattern\fP \fImailbox\fP
\fBfcc-hook\fP \fIpattern\fP \fImailbox\fP
\fBsave-hook\fP \fIpattern\fP \fImailbox\fP
.fi
.IP
\fBfcc-save-hook\fP is a shortcut, equivalent to doing both a \fBfcc-hook\fP
and a \fBsave-hook\fP with its arguments, including %-expansion on
\fImailbox\fP according to $index_format.
.IP
\fBfcc-hook\fP is used to save outgoing mail in a mailbox other than $record.
NeoMutt searches the initial list of message recipients for the first matching
\fIpattern\fP and uses \fImailbox\fP as the default \(lqFcc:\(rq mailbox. If no
match is found the message will be saved to $record mailbox.
.IP
\fBsave-hook\fP is used to override the default mailbox used when saving
messages. \fImailbox\fP will be used as the default if the message matches
\fIpattern\fP.
.IP
To provide more flexibility and good defaults, NeoMutt applies the expandos of
$index_format to \fImailbox\fP after it was expanded. See \fIPATTERNS\fP
section below or consult section \(lq\fBMessage Matching in Hooks\fP\(rq in
NeoMutt manual for information on the exact format of \fIpattern\fP.
.
.PP
.nf
\fBfolder-hook\fP [\fI-noregex\fP] \fIregex\fP \fIcommand\fP
.fi
.IP
When NeoMutt enters a folder which matches \fIregex\fP (or, when \fIregex\fP is
preceded by an exclamation mark, does not match \fIregex\fP), the given
\fIcommand\fP is executed. The \fI-noregex\fP switch controls whether \fIregex\fP
is matches as simple string equality or full regex match.
.IP
When several \fBfolder-hook\fPs match a given mail folder, they are executed in
the order given in the configuration file.
.
.PP
.nf
\fBgroup\fP [ \fB\-group\fP \fIname\fP ... ] { \fB\-rx\fP \fIregex\fP ... | \fB\-addr\fP \fIaddress\fP ... }
\fBungroup\fP [ \fB\-group\fP \fIname\fP ... ] { \fB*\fP | \fB\-rx\fP \fIregex\fP ... | \fB\-addr\fP \fIaddress\fP ... }
.fi
.IP
\fBgroup\fP is used to directly add either addresses or regular expressions to
the specified group or groups. The different categories of arguments to the
\fBgroup\fP command can be in any order. The flags \fB\-rx\fP and \fB\-addr\fP
specify what the following strings (that cannot begin with a hyphen) should be
interpreted as: either a regular expression or an email address, respectively.
.IP
\fBungroup\fP is used to remove addresses or regular expressions from the
specified group or groups. The syntax is similar to the \fBgroup\fP command,
however the special character \(lq\fB*\fP\(rq can be used to empty a group of
all of its contents.
.IP
These address groups can also be created implicitly by the \fBalias\fP,
\fBlists\fP, \fBsubscribe\fP and \fBalternates\fP commands by specifying the
optional \fB\-group\fP option.
.IP
Once defined, these address groups can be used in patterns to search for and
limit the display to messages matching a group.
.
.PP
.nf
\fBhdr_order\fP \fIheader\fP [ \fIheader\fP ... ]
\fBunhdr_order\fP { \fB*\fP | \fIheader\fP ... }
.fi
.IP
With the \fBhdr_order\fP command you can specify an order in which NeoMutt will
attempt to present these headers to you when viewing messages.
.IP
\(lq\fBunhdr_order\~*\fP\(rq will clear all previous headers from the order
list, thus removing the header order effects set by the system-wide startup
file.
.
.PP
.nf
\fBifdef\fP \fIsymbol\fP "\fIconfig-command\fP [ \fIargs\fP ... ]"
\fBifndef\fP \fIsymbol\fP "\fIconfig-command\fP [ \fIargs\fP ... ]"
\fBfinish\fP
.fi
.IP
The \fBifdef\fP feature introduces three new commands to NeoMutt and allow you
to share one config file between versions of NeoMutt that may have different
features compiled in.
.IP
.
.TS
box;
lb|lb
l|l .
Example Symbol	Description
_
\f[CR]sidebar_format\fP	Config variable
\f[CR]status-color\fP, \f[CR]imap\fP	Compiled-in feature
\f[CR]pgp-menu\fP, \f[CR]group-related\fP	Function
\f[CR]index-format-hook\fP, \f[CR]tag-transforms\fP	Command
\f[CR]my_var\fP	My variable
\f[CR]lmdb\fP, \f[CR]tokyocabinet\fP	Store (database)
\f[CR]HOME\fP, \f[CR]COLUMNS\fP	Environment variable
.TE
.
.IP
A list of compile-time \fIsymbol\fPs can be seen in
the output of the command \(lq\fBneomutt\~\-v\fP\(rq (in the
\(lq\fBCompile options\fP\(rq section).
.IP
\fBfinish\fP is particularly useful when combined with \fBifndef\fP.
.
.PP
.nf
\fBignore\fP \fIstring\fP [ \fIstring\fP ... ]
\fBunignore\fP { \fB*\fP | \fIstring\fP ... }
.fi
.IP
The \fBignore\fP command allows you to specify header fields which you don't
normally want to see in the pager. You do not need to specify the full header
field name. For example, \(lq\fBignore\fP content-\(rq will ignore all header
fields that begin with the string \(lqcontent-\(rq, \(lq\fBignore\fP\~*\(rq
will ignore all headers.
.IP
To remove a previously added token from the list, use the \fBunignore\fP
command. For example, \(lq\fBunignore\fP\~*\(rq will remove all tokens from the
ignore list.
.
.PP
.nf
\fBlists\fP [ \fB\-group\fP \fIname\fP ... ] \fIregex\fP [ \fIregex\fP ... ]
\fBunlists\fP [ \fB\-group\fP \fIname\fP ... ] { \fB*\fP | \fIregex\fP ... }
\fBsubscribe\fP [ \fB\-group\fP \fIname\fP ... ] \fIregex\fP [ \fIregex\fP ... ]
\fBunsubscribe\fP [ \fB\-group\fP \fIname\fP ... ] { \fB*\fP | \fIregex\fP ... }
.fi
.IP
NeoMutt maintains two lists of mailing list address regular expressions, a list
of subscribed mailing lists, and a list of known mailing lists. All subscribed
mailing lists are known.
.IP
The \fBlists\fP command adds a mailing list address to the list of known
mailing lists. The \fBunlists\fP command removes a mailing list from the lists
of known and subscribed mailing lists.
.IP
The \fBsubscribe\fP command adds a mailing list to the lists of known and
subscribed mailing lists. The \fBunsubscribe\fP command removes it from the
list of subscribed mailing lists.
.IP
The \fB\-group\fP flag adds all of the subsequent regular expressions to the
\fIname\fPd group.
.
.PP
.nf
\fBmacro\fP \fImenu\fP[\fB,\fP\fImenu\fP ... ] \fIkey\fP \fIsequence\fP [ \fIdescription\fP ]
\fBunmacro\fP { \fB*\fP | \fImenu\fP | [\fB,\fP\fImenu\fP...]} [ \fIkey\fP ]
.fi
.IP
This command binds the given \fIsequence\fP of keys to the given \fIkey\fP in
the given \fImenu\fP or menus. For currently defined menus, see \fBbind\fP
command above. To specify multiple menus, put only a comma between the menus.
.IP
Optionally you can specify a descriptive text after \fIsequence\fP, which is
shown in the help screens if they contain a \fIdescription\fP.
.IP
Missing key sequence in \fBunmacro\fP command means unmacro all macros in menus given in \fImenu\fP.
.
.PP
.nf
\fBmailboxes\fP [[\fB-label\fP \fIlabel\fP] | \fB-nolabel\fP]
           [[\fB-notify\fP | \fB-nonotify\fP]
           [\fB-poll\fP | \fB-nopoll\fP]
           \fImailbox\fP] [ ... ]
\fBnamed-mailboxes\fP \fIlabel\fP \fImailbox\fP [\fIlabel\fP \fImailbox\fP ... ]
\fBunmailboxes\fP { \fB*\fP | \fImailbox\fP ... }
.fi
.IP
The \fBmailboxes\fP specifies folders which can receive mail and which will be
checked for new messages. When changing folders, pressing space will cycle
through folders with new mail.
.IP
The \fBnamed-mailboxes\fP is an alternative to \fBmailboxes\fP \fB-label\fP
\fIlabel\fP.  NeoMutt can be configured to display the label instead of the
mailbox path.
.IP
The \fBunmailboxes\fP command is used to remove a file name from the list of
folders which can receive mail. If \(lq\fB*\fP\(rq is specified as the file
name, the list is emptied.
.
.PP
.nf
\fBmailto_allow\fP { \fB*\fP | \fIheader-field\fP ... }
\fBunmailto_allow\fP { \fB*\fP | \fIheader-field\fP ... }
.fi
.IP
As a security measure, NeoMutt will only add user-approved \fIheader-field\fPs
from a \fImailto:\fP URL. This is necessary since NeoMutt will handle certain
\fIheader-field\fPs, such as \fBAttach\fP, in a special way. The
\fBmailto_allow\fP and \fBunmailto_allow\fP commands allow the user to modify
the list of approved headers.
.IP
NeoMutt initializes the default list to contain only the \fBSubject\fP and
\fBBody\fP \fIheader-field\fPs, which are the only requirement specified by the
\fImailto:\fP specification in RFC2368, and the \fBCc\fP, \fBIn-Reply-To\fP,
\fBReferences\fP headers to aid with replies to mailing lists.
.TP
\fBecho\fP \fImessage\fP
Prints \fImessage\fP to the message window. After printing the
message, echo will pause for the number of seconds specified by
$sleep_time.
.TP
\fBcd\fP \fIdirectory\fP
Changes the current working directory.
.
.PP
.nf
\fBmbox-hook\fP [\fI-noregex\fP] \fIregex\fP \fImailbox\fP
.fi
.IP
When NeoMutt changes to a mail folder which matches \fIregex\fP, \fImailbox\fP
will be used as the \(lqmbox\(rq folder, i.e. read messages will be moved to
that folder when the mail folder is left. The \fI-noregex\fP switch controls
whether \fIregex\fP is matches as simple string equality or full regex match.

.IP
Note that execution of \fBmbox-hook\fPs is dependent on the $move configuration
variable. If set to \(lqno\(rq (the default), \fBmbox-hook\fPs will not be
executed.
.IP
The first matching \fBmbox-hook\fP applies.
.
.PP
.nf
\fBmessage-hook\fP \fIpattern\fP \fIcommand\fP
.fi
.IP
Before NeoMutt displays (or formats for replying or forwarding) a message which
matches the given \fIpattern\fP (or, when it is preceded by an exclamation
mark, does not match the \fIpattern\fP), the given \fIcommand\fP is executed.
When multiple \fBmessage-hook\fPs match, they are executed in the order in
which they occur in the configuration file.
.
.PP
.nf
\fBmime_lookup\fP \fImime-type\fP[\fB/\fP\fImime-subtype\fP] [ \fImime-type\fP[\fB/\fP\fImime-subtype\fP] ... ]
\fBunmime_lookup\fP { \fB*\fP | \fImime-type\fP[\fB/\fP\fImime-subtype\fP] ... }
.fi
.IP
This command permits you to define a list of \(lqdata\(rq MIME content types
for which NeoMutt will try to determine the actual file type from the file
name, and not use a
.BR mailcap (5)
entry given for the original MIME type. For instance, you may add the
\fBapplication/\:octet-stream\fP MIME type to this list.
.IP
In addition, the \fBunmime_lookup\fP command may be used to disable this
feature for any particular MIME type if it had been set, for example in
a global \fIneomuttrc\fP.
.
.PP
.nf
\fBmono\fP \fIobject\fP \fIattribute\fP
\fBmono\fP { header | body } \fIattribute\fP \fIregex\fP
\fBmono\fP index-object \fIattribute\fP \fIpattern\fP
\fBunmono\fP { index-object | header | body } { \fB*\fP | \fIpattern\fP ... }
.fi
.IP
For terminals which don't support color, you can still assign
attributes to objects.
.
.PP
.nf
\fBmy_hdr\fP \fIstring\fP
\fBunmy_hdr\fP { \fB*\fP | \fIfield\fP ... }
.fi
.IP
Using \fBmy_hdr\fP, you can define headers which will be added to the messages
you compose. \fBunmy_hdr\fP will remove the given user-defined headers.
.
.PP
.nf
\fBopen-hook\fP \fIregex\fP "\fIshell-command\fP"
\fBclose-hook\fP \fIregex\fP "\fIshell-command\fP"
\fBappend-hook\fP \fIregex\fP "\fIshell-command\fP"
.fi
.IP
These commands provide a way to handle compressed folders. The given
\fIregex\fP specifies which folders are taken as compressed (e.g.
\(dq\fB\(rs.gz$\fP\(dq). The commands tell NeoMutt how to uncompress a folder
(\fBopen-hook\fP), compress a folder (\fBclose-hook\fP) or append a compressed
mail to a compressed folder (\fBappend-hook\fP). The \fIshell-command\fP is a
.BR printf (3)
like format string and must contain two placeholders for from (\fB%f\fP) and to
(\fB%t\fP) filenames which should be placed inside single-quotes to prevent
unintended shell expansions. Examples:
.RS
.IP
.EX
.BR append-hook " \(aq" "\(rs.gz$" "\(aq \(dqgzip \-\-stdout \(aq" "%t" "\(aq >> \(aq" "%f" "\(aq\(dq"
.BR close-hook " \(aq" "\(rs.gz$" "\(aq \(dqgzip \-\-stdout \(aq" "%t" "\(aq > \(aq" "%f" "\(aq\(dq"
.BR open-hook " \(aq" "\(rs.gz$" "\(aq \(dqgzip \-\-stdout \-\-decompress \(aq" "%f" "\(aq > \(aq" "%t" "\(aq\(dq"
.EE
.RE
.
.PP
.nf
\fBpush\fP \fIstring\fP
.fi
.IP
This command adds the named \fIstring\fP to the beginning of the keyboard
buffer. The string may contain control characters, key names and function names
like the sequence string in the \fBmacro\fP command. You may use it to
automatically run a sequence of commands at startup, or when entering certain
folders.
.IP
For using functions, it's important to use angle brackets (\(lq<\(rq and
\(lq>\(rq) to make NeoMutt recognize the input as a function name. Otherwise
it will simulate individual just keystrokes.
.
.
.PP
.nf
\fBreply-hook\fP \fIpattern\fP \fIcommand\fP
\fBsend-hook\fP \fIpattern\fP \fIcommand\fP
\fBsend2-hook\fP \fIpattern\fP \fIcommand\fP
.fi
.IP
These commands can be used to execute arbitrary configuration commands based
upon recipients of the message. \fIpattern\fP is used to match the message, see
section \(lq\fBMessage Matching in Hooks\fP\(rq in manual for details.
\fIcommand\fP is executed when \fIpattern\fP matches.
.IP
\fBreply-hook\fP is matched against the message you are replying to, instead of
the message you are sending. \fBsend-hook\fP is matched against all messages,
both new and replies. \fBNote\fP, \fBreply-hook\fPs are matched before the
\fBsend-hook\fP, regardless of the order specified in the user's configuration
file.
.IP
\fBsend2-hook\fP is matched every time a message is changed, either by editing
it, or by using the compose menu to change its recipients or subject.
\fBsend2-hook\fP is executed after \fBsend-hook\fP, and can, e.g., be used to
set parameters such as the $sendmail variable depending on the message's sender
address. \fBNote\fP, \fBsend-hook\fPs are only executed once after getting the
initial list of recipients.
.
.PP
.nf
\fBscore\fP \fIpattern\fP \fIvalue\fP
\fBunscore\fP { \fB*\fP | \fIpattern\fP ... }
.fi
.IP
The \fBscore\fP command adds \fIvalue\fP to a message's score if \fIpattern\fP
matches it. \fIpattern\fP is a string in the format described in the
\fIPATTERNS\fP section below. \fIvalue\fP is a positive or negative integer.
A message's final score is the sum total of all matching score entries.
.IP
The \fBunscore\fP command removes score entries from the list. You must specify
the same \fIpattern\fP specified in the \fBscore\fP command for it to be
removed. The pattern \(lq\fB*\fP\(rq is a special token which means to clear
the list of all score entries.
.
.PP
.nf
\fBset\fP { [ \fBno\fP | \fBinv\fP | \fB&\fP | \fB?\fP ]\fIvariable\fP } [ ... ]
\fBset\fP { \fIvariable\fP=\fIvalue\fP | \fIvariable+=increment\fP | \fIvariable-=decrement\fP } [ ... ]
\fBunset\fP \fIvariable\fP  [ \fIvariable\fP ... ]
\fBreset\fP \fIvariable\fP  [ \fIvariable\fP ... ]
\fBtoggle\fP \fIvariable\fP [ \fIvariable\fP ... ]
\fBset\fP \fIvariable\fP \fB?\fP
.fi
.IP
These commands are used to set and manipulate configuration \fIvariable\fPs.
.IP
NeoMutt knows four basic types of \fIvariable\fPs: boolean, number, string, string
list and quadoption. Boolean \fIvariable\fPs can be \fBset\fP (true), \fBunset\fP
(false), or \fBtoggle\fPd. Number \fIvariable\fPs can be assigned a positive
integer \fIvalue\fP. Value of number \fIvariable\fPs can be incremented "\fB+=\fP"
and decremented "\fB-=\fP". String list \fIvariable\fPs use "\fB+=\fP" for
appending increment to the string list and "\fB-=\fP" for removal decrement from
the string list.
.IP
String \fIvariable\fPs consist of any number of printable characters and must
be enclosed in quotes if they contain spaces or tabs. You may also use the
escape sequences \(lq\fB\(rsn\fP\(rq and \(lq\fB\(rst\fP\(rq for newline and
tab, respectively. Content of a string \fIvariable\fPs can be extended using
"\fB+=\fP"
.IP
Quadoption \fIvariable\fPs are used to control whether or not to be prompted
for certain actions, or to specify a default action. A \fIvalue\fP of \fByes\fP
will cause the action to be carried out automatically as if you had answered
\(lqyes\(rq to the question. Similarly, a \fIvalue\fP of \fBno\fP will cause
the action to be carried out as if you had answered \(lqno\(rq.  A \fIvalue\fP
of \fBask-yes\fP will cause a prompt with a default answer of \(lqyes\(rq and
\fBask-no\fP will provide a default answer of \(lqno\(rq.
.IP
The \fBtoggle\fP command automatically prepends the \(lq\fBinv\fP\(rq prefix to
all specified \fIvariable\fPs. The \fBunset\fP command automatically prepends
the \(lq\fBno\fP\(rq prefix to all specified \fIvariable\fPs. If you use the
command \fBset\fP and prefix the \fIvariable\fP with \(lq\fB&\fP\(rq this has
the same behavior as the \fBreset\fP command.
.IP
The \fBreset\fP command resets all given \fIvariable\fPs to the compile time
defaults. With the \fBreset\fP command there exists the special \fIvariable\fP
\fBall\fP, which allows you to reset all \fIvariable\fPs to their system
defaults.
.IP
Using the <\fBenter-command\fP> function, you can query the \fIvalue\fP of
a \fIvariable\fP by suffixing the name of the \fIvariable\fP with a question
mark: \(dq:\fBset\fP\~allow_8bit\fB?\fP\(dq.
The old prefix query syntax (\(dq:\fBset\fP\~\fB?\fPallow_8bit\(dq) is also
still supported.
.
.PP
.nf
\fBsetenv\fP { \fB?\fP\fIvariable\fP | \fIvariable\fP \fIvalue\fP }
\fBunsetenv\fP \fIvariable\fP
.fi
.IP
You can alter the environment that NeoMutt passes on to its child processes
using the \fBsetenv\fP and \fBunsetenv\fP operators.
.IP
You can also query current environment \fIvalue\fPs by prefixing a
\(lq\fB?\fP\(rq character.
.
.PP
.nf
\fBsidebar_pin\fP \fImailbox\fP [ \fImailbox\fP ...]
\fBsidebar_unpin\fP { \fB*\fP | \fImailbox\fP ... }
.fi
.IP
The \fBsidebar_pin\fP command specifies \fImailbox\fPes that will always
be displayed in the sidebar, even if $sidebar_new_mail_only is set and the
\fImailbox\fP does not contain new mail.
.IP
The \fBsidebar_unpin\fP command is used to remove a \fImailbox\fP from
the list of always displayed \fImailbox\fPes. Use
\(lq\fBsidebar_unpin\~*\fP\(rq to remove all \fImailbox\fPes.
.
.PP
.nf
\fBsource\fP \fIfilename\fP
.fi
.IP
This command allows the inclusion of initialization commands from other files.
If the \fIfilename\fP begins with a tilde (\(lq~\(rq), it will be expanded to
the path of your home directory.
.IP
If the \fIfilename\fP ends with a vertical bar (\(lq|\(rq), then \fIfilename\fP
is considered to be an executable program from which to read input, (e.g.
\(lq\fBsource\fP\~\fI~/\:bin/\:myscript\fP|\(rq).
.IP
If the filename is relative and the command \fBsource\fP is executed from the
context of a configuration file, then the filename is interpreted relative to
the directory of that configuration file.  If the command is executed outside
of a configuration file, e.g. from the prompt, then the filename is interpreted
relative to the current working directory (see \fBcd\fP on how to change the
current working directory at runtime).
.IP
Note: A hook remembers the configuration file it was defined in and sets the
context to that file when executing its commands.  As a result a \fBsource\fP command
inside a hook is executed in the context of the configuration file the hook was
defined in.  Thus relative filenames are interpreted relative to the
configuration file the hook is defined in.
.
.PP
.nf
\fBspam\fP \fIregex\fP \fIformat\fP
\fBnospam\fP { \fB*\fP | \fIregex\fP }
.fi
.IP
NeoMutt has generalized support for external spam-scoring filters. By defining
your spam \fIregex\fPs with the \fBspam\fP and \fBnospam\fP commands, you can
limit, search, and sort your mail based on its spam attributes, as determined
by the external filter. You also can display the spam attributes in your index
display using the %H selector in the $index_format variable. (Tip: try
\(dq%<H?[%H]\~>\(dq to display spam tags only when they are defined for a given
message).
.IP
For further information on spam-scoring filters, please consult the
section \(lq\fBSpam Detection\fP\(rq in the NeoMutt manual.
.
.PP
.nf
\fBsubjectrx\fP \fIregex\fP \fIreplacement\fP
\fBunsubjectrx\fP { \fB*\fP | \fIregex\fP }
.fi
.IP
The \fBsubjectrx\fP command specifies a regular expression which,
if detected in a message subject, causes the subject to be replaced with the
\fIreplacement\fP value. The \fIreplacement\fP is subject to substitutions in
the same way as for the \fBspam\fP command: %L for the text to the left of the
match, %R for text to the right of the match, and %1 for the first subgroup in
the match (etc). If you simply want to erase the match, set it to \(lq%L%R\(rq.
Any number of \fBsubjectrx\fP commands may coexist.
.IP
Note this well: the \fIreplacement\fP value replaces the entire subject, not
just the match!
.IP
\fBunsubjectrx\fP removes a given \fBsubjectrx\fP from the substitution list.
If \(lq\fB*\fP\(rq is used as the argument, all substitutions will be removed.
.
.PP
.nf
\fBsubscribe-to\fP \fIimap-folder-uri\fP
\fBunsubscribe-from\fP \fIimap-folder-uri\fP
.fi
.IP
Tell the IMAP server to subscribe to or unsubscribe from the folder
\fIimap-folder-uri\fP.  The argument must be an IMAP URI,
e.g. \(lq\fBsubscribe-to\fP imaps://mail.example.org/inbox\(rq.
.IP
Subscription is an IMAP protocol feature where the server manages a list of
subscribed folders.  This list can be queried by clients like NeoMutt.
.IP
NeoMutt uses that list in various situations, see $imap_list_subscribed and
$imap_check_subscribed.
.
.PP
.nf
\fBtimeout-hook\fP \fIcommand\fP
\fBstartup-hook\fP \fIcommand\fP
\fBshutdown-hook\fP \fIcommand\fP
.fi
.IP
The \fBGlobal Hooks\fP feature introduces these hooks to NeoMutt. They are
called when global events take place in NeoMutt. \fBstartup-hook\fP and
\fBshutdown-hook\fP are most likely to be useful to users of
.BR notmuch (1).
.IP
\fBtimeout-hook\fP runs a \fIcommand\fP periodically when NeoMutt checks for
new mail. This hook is called every $timeout seconds.
.IP
Before NeoMutt opens the first mailbox when first starting, NeoMutt will run
the \fBstartup-hook\fP for the given \fIcommand\fP.
.IP
Before NeoMutt is about to exit, and before the mailbox is closed, NeoMutt will
run the \fBshutdown-hook\fP for the given \fIcommand\fP.
.
.PP
.nf
\fBunhook\fP { \fB*\fP | \fIhook-type\fP }
.fi
.IP
This command permits you to flush hooks you have previously defined. You can
either remove all hooks by giving the \(lq\fB*\fP\(rq character as an argument,
or you can remove all hooks of a specific \fIhook-type\fP by saying something
like \(lq\fBunhook\fP\~\fIsend-hook\fP\(rq.
.
.\" --------------------------------------------------------------------
.SH PATTERNS
.\" --------------------------------------------------------------------
.SS "\s-1Pattern Modifier\s0"
.\" --------------------------------------------------------------------
.PP
Many of NeoMutt's commands allow you to specify a pattern to match messages
.RB ( limit ", " tag-pattern ", " delete-pattern ", the above mentioned " hook
commands etc.). The table \(lq\fBPattern modifiers\fP\(rq shows several ways to
select messages.
.
.na
.TS
box tab(|);
lb s | lb
l s | lx
.
\0Pattern|Description
_
\0~A|T{
all messages
T}
_
\0=B \fISTRING\fP|T{
messages which contain \fISTRING\fP in the whole message. If IMAP is enabled,
searches for \fISTRING\fP on the server, rather than downloading each message
and searching it locally.
T}
_
\0=b \fISTRING\fP|T{
messages which contain \fISTRING\fP in the message body. If IMAP is enabled,
searches for \fISTRING\fP on the server, rather than downloading each message
and searching it locally.
T}
_
\0~B \fIEXPR\fP|T{
messages which contain \fIEXPR\fP in the whole message
T}
_
\0~b \fIEXPR\fP|T{
messages which contain \fIEXPR\fP in the message body
T}
_
\0%C \fIGROUP\fP|T{
messages either \(lqTo:\(rq, \(lqCc:\(rq or \(lqBcc:\(rq to any member of \fIGROUP\fP
T}
_
\0%c \fIGROUP\fP|T{
messages carbon-copied to any member of \fIGROUP\fP
T}
_
\0~C \fIEXPR\fP|T{
messages either \(lqTo:\(rq, \(lqCc:\(rq or \(lqBcc:\(rq \fIEXPR\fP
T}
_
\0~c \fIEXPR\fP|T{
messages carbon-copied to \fIEXPR\fP
T}
_
\0~D|T{
deleted messages
T}
_
\0~d \fIMIN\fP-\fIMAX\fP|T{
messages with \(lqdate-sent\(rq in a date range
T}
_
\0%e \fIGROUP\fP|T{
messages which contain a member of \fIGROUP\fP in the \(lqSender:\(rq field
T}
_
\0~E|T{
expired messages
T}
_
\0~e \fIEXPR\fP|T{
messages which contain \fIEXPR\fP in the \(lqSender:\(rq field
T}
_
\0%f \fIGROUP\fP|T{
messages originating from any member of \fIGROUP\fP
T}
_
\0~F|T{
flagged messages
T}
_
\0~f \fIEXPR\fP|T{
messages originating from \fIEXPR\fP
T}
_
\0~G|T{
cryptographically encrypted messages
T}
_
\0~g|T{
cryptographically signed messages
T}
_
\0=h \fISTRING\fP|T{
messages which contain \fISTRING\fP in the message header. If IMAP is enabled,
searches for \fISTRING\fP on the server, rather than downloading each message
and searching it locally; \fISTRING\fP must be of the form \(lqHeader:
substring\(rq (see below).
T}
_
\0~H \fIEXPR\fP|T{
messages with spam attribute matching \fIEXPR\fP
T}
_
\0~h \fIEXPR\fP|T{
messages which contain \fIEXPR\fP in the message header
T}
_
\0~i \fIEXPR\fP|T{
messages which match \fIEXPR\fP in the \(lqMessage-ID:\(rq field
T}
_
\0~I \fIQUERY\fP|T{
messages whose \fIMessage-ID\fP field is included in the results returned from
an external search program, when the program is run with \fIQUERY\fP as its
argument. See $external_search_command
T}
_
\0~k|T{
messages containing PGP key material
T}
_
\0~K \fIEXPR\fP|T{
messages blind carbon-copied to \fIEXPR\fP
T}
_
\0%L \fIGROUP\fP|T{
messages either originated or received by any member of \fIGROUP\fP
T}
_
\0~L \fIEXPR\fP|T{
messages either originated or received by \fIEXPR\fP
T}
_
\0~l|T{
messages addressed to a known mailing list
T}
_
\0~M \fIEXPR\fP|T{
messages which contain a mime Content-Type matching \fIEXPR\fP
T}
_
\0~m <\fIMAX\fP|T{
messages with numbers less than \fIMAX\fP \fB*\fP)
T}
_
\0~m >\fIMIN\fP|T{
messages with numbers greater than \fIMIN\fP \fB*\fP)
T}
_
\0~m \fIMIN\fP,\fIMAX\fP|T{
messages with offsets (from selected message) in the range \fIMIN\fP to
\fIMAX\fP \fB*\fP)
T}
_
\0~m \fIMIN\fP-\fIMAX\fP|T{
message in the range \fIMIN\fP to \fIMAX\fP \fB*\fP)
T}
_
\0~m \fIN\fP|T{
just message number \fIN\fP \fB*\fP)
T}
_
\0~N|T{
new messages
T}
_
\0~n \fIMIN\fP-\fIMAX\fP|T{
messages with a score in the range \fIMIN\fP to \fIMAX\fP \fB**\fP)
T}
_
\0~O|T{
old messages
T}
_
\0~P|T{
messages from you (consults $from, \fBalternates\fP, and local account/hostname information)
T}
_
\0~p|T{
messages addressed to you (consults $from, \fBalternates\fP, and local account/hostname information)
T}
_
\0~Q|T{
messages which have been replied to
T}
_
\0~R|T{
read messages
T}
_
\0~r \fIMIN\fP-\fIMAX\fP|T{
messages with \(lqdate-received\(rq in a date range
T}
_
\0~S|T{
superseded messages
T}
_
\0~s \fIEXPR\fP|T{
messages having \fIEXPR\fP in the \(lqSubject:\(rq field
T}
_
\0~T|T{
tagged messages
T}
_
\0~t \fIEXPR\fP|T{
messages addressed to \fIEXPR\fP
T}
_
\0~U|T{
unread messages
T}
_
\0~u|T{
messages addressed to a subscribed mailing list
T}
_
\0~V|T{
cryptographically verified messages
T}
_
\0~v|T{
message is part of a collapsed thread.
T}
_
\0~w \fIEXPR\fP|T{
newsgroups matching \fIEXPR\fP
T}
_
\0~X \fIMIN\fP-\fIMAX\fP|T{
messages with \fIMIN\fP to \fIMAX\fP attachments \fB**\fP)
T}
_
\0~x \fIEXPR\fP|T{
messages which contain \fIEXPR\fP in the \(lqReferences:\(rq or
\(lqIn-Reply-To:\(rq field
T}
_
\0~y \fIEXPR\fP|T{
messages which contain \fIEXPR\fP in their keywords
T}
_
\0~Y \fIEXPR\fP|T{
messages whose tags match \fIEXPR\fP
T}
_
\0~z \fIMIN\fP-\fIMAX\fP|T{
messages with a size in the range \fIMIN\fP to \fIMAX\fP \fB**\fP) \fB***\fP)
T}
_
\0=/ \fISTRING\fP|T{
IMAP custom server-side search for \fISTRING\fP. Currently only defined for
Gmail. See section \(lq\fBGmail Patterns\fP\(rq in NeoMutt manual.
T}
_
\0~=|T{
duplicated messages (see $duplicate_threads)
T}
_
\0~#|T{
broken threads (see $strict_threads)
T}
_
\0~$|T{
unreferenced message (requires threaded view)
T}
_
\0~(\fIPATTERN\fP)|T{
messages in threads containing messages matching \fIPATTERN\fP, e.g. all
threads containing messages from you: ~(~P)
T}
_
\0~<(\fIPATTERN\fP)|T{
messages whose immediate parent matches \fIPATTERN\fP, e.g. replies to your
messages: ~<(~P)
T}
_
\0~>(\fIPATTERN\fP)|T{
messages having an immediate child matching \fIPATTERN\fP, e.g. messages you
replied to: ~>(~P)
T}
_
.T&
l s s .
T{
\0Where \fIEXPR\fP is a regular expression, and \fIGROUP\fP is an address group.
T}
.T&
l l s .
.PP
\0\fB*\fP)|T{
The message number ranges (introduced by \(lq\fB~m\fP\(rq) are even
more general and powerful than the other types of ranges. Read on and see
section \(lq\fBMessage Ranges\fP\(rq in manual.
T}
\0\fB**\fP)|T{
The forms \(lq<\fIMAX\fP\(rq, \(lq>\fIMIN\fP\(rq, \(lq\fIMIN\fP-\(rq and
\(lq-\fIMAX\fP\(rq are allowed, too.
T}
\0\fB***\fP)|T{
The suffixes \(lqK\(rq and \(lqM\(rq are allowed to specify
kilobyte and megabyte respectively.
T}
.TE
.PP
.ad
.
.PP
Special attention has to be paid when using regular expressions inside of
patterns. Specifically, NeoMutt's parser for these patterns will strip one
level of backslash (\(lq\fB\(rs\fP\(rq), which is normally used for quoting. If
it is your intention to use a backslash in the regular expression, you will
need to use two backslashes (\(lq\fB\(rs\(rs\fP\(rq) instead.
.
.PP
You can force NeoMutt to treat \fIEXPR\fP as a simple \fISTRING\fP instead of
a regular expression by using \(lq\fB=\fP\(rq instead of \(lq\fB~\fP\(rq in the
pattern name. For example, \(lq\fB=b\~*.*\fP\(rq will find all messages that
contain the literal \fISTRING\fP \(lq\fB*.*\fP\(rq. Simple substring matches
are less powerful than regular expressions but can be considerably faster. This
is especially true for IMAP folders, because substring matches can be performed
on the server instead of by fetching every message. IMAP treats
\(lq\fB=h\fP\(rq specially: it must be of the form
\(lqHeader:\~\fIsubstring\fP\(rq and will \fBnot\fP partially match header
names. The \fIsubstring\fP part may be omitted if you simply wish to find
messages containing a particular header without regard to its value.
.
.PP
Patterns matching lists of addresses (notably
.BR c ", " C ", " p ", " P " and " t )
match if there is at least one match in the whole list. If you want to make
sure that all elements of that list match, you need to prefix your pattern with
\(lq\fB^\fP\(rq.
.
.PP
This example matches all mails which only has recipients from Germany.
.IP
Matching all addresses in address lists:
.BI ^~C\~ \(rs.de$
.
.PP
You can restrict address pattern matching to aliases that you have defined with
the \(lq\fB@\fP\(rq modifier. This example matches messages whose recipients
are all from Germany \fBand\fP who are known to your alias list.
.
.IP
Matching restricted to aliases:
.BI ^@~C\~ \(rs.de$
.
.PP
To match any defined alias, use a regular expression that matches \fBany\fP
string. This example matches messages whose senders are known aliases.
.
.IP
Matching any defined alias:
.BI @~f\~ .
.
.SS "\s-1Nesting and Boolean Operators\s0"
.\" --------------------------------------------------------------------
.PP
Logical AND is performed by specifying more than one criterion.
.IP
For example:
.BI ~t\~ work " ~f\~" smith
.
.PP
would select messages which contain the word \(lqwork\(rq in the list of
recipients \fBand\fP that have the word \(lqsmith\(rq in the \(lqFrom:\(rq
header field.
.
.PP
NeoMutt also recognizes the following operators to create more complex
search patterns:
.
.RS
.TP 4
\(bu \(lq\fB!\fP\(rq \(em logical NOT operator
.TQ
\(bu \(lq\fB|\fP\(rq \(em logical OR operator
.TQ
\(bu \(lq\fB()\fP\(rq \(em logical grouping operator
.RE
.
.PP
Here is an example illustrating a complex search pattern. This pattern will
select all messages which do \fBnot\fP contain \(lqwork\(rq in the \(lqTo:\(rq
\fBor\fP \(lqCc:\(rq field \fBand\fP which are from \(lqsmith\(rq.
.
.IP
Using boolean operators in patterns:
.BI !(~t\~ work |~c\~ work ") ~f\~" smith
.
.PP
Here is an example using white space in the regular expression (note the
\(lq\fB\(aq\fP\(rq and \(lq\fB\(dq\fP\(rq delimiters). For this to match, the
mail's subject must match the \(lq^Junk +From +Me$\(rq \fBand\fP it must be
from either \(lqJim +Somebody\(rq \fBor\fP \(lqEd +SomeoneElse\(rq:
.
.IP
Quoting regex:
.na
.IB \(aq ~s\~ "\(dq^Junk +From +Me$\(dq"
.BI ~f\~( "\(dqJim +Somebody\(dq" | "\(dqEd +SomeoneElse\(dq" ) \(aq
.ad
.
.PP
\fBNote\fP: If a regular expression contains parenthesis, or a vertical bar
(\(lq\fB|\fP\(rq), you must enclose the expression in double or single quotes
since those characters are also used to separate different parts of NeoMutt's
pattern language.
.
.IP
For example:
.BI ~f \~\(dquser@ ( home\(rs.org | work\(rs.com ) \(dq
.
.PP
Without the quotes, the parenthesis wouldn't end. This would be separated to
two OR'd patterns:
.BI ~f \~user@(home\(rs.org
.RI "and " work\(rs.com) ". They are never what you want."
.
.SS "\s-1Searching by Date\s0"
.\" --------------------------------------------------------------------
.PP
NeoMutt supports two types of dates, \fBabsolute\fP and \fBrelative\fP for
the \(lq\fB~d\fP\(rq and \(lq\fB~r\fP\(rq pattern.
.
.PP
.nf
.B Absolute Dates
.fi
Dates must be in
.IR dd [/ mm [/[ CC ] YY ]]
format (day, month, century and year \(em all parts, with the exception of day,
are optional, defaulting to the current month and year). An example of a valid
range of dates is:
.
.IP
Limit to messages matching:
.IR \fB~d\fP\~20 / 1 / 95 - 31 / 10
.
.PP
Alternatively, you may use \fIYYYYMMDD\fP to specify a date.
.PP
When given a two-digit year, NeoMutt will interpret values less than \(lq70\(rq
as lying in the 21st century (i.e., \(lq38\(rq means 2038 and not 1938, and
\(lq00\(rq is interpreted as 2000), and values greater than or equal to
\(lq70\(rq as lying in the 20th century.
.
.PP
If you omit the \fIMIN\fPimum (first) date, and just specify
.RI - dd / mm / YY ,
all messages before the given date will be selected. If you omit the
\fIMAX\fPimum (second) date, and specify
.IR dd / mm / YY -,
all messages after the given date will be selected. If you specify a single
date with no dash (\(lq\fB-\fP\(rq), only messages sent/received on the given
date will be selected.
.
.PP
You can add error margins to absolute dates. An error margin is a sign
(\(lq\fB+\fP\(rq or \(lq\fB-\fP\(rq), followed by a digit, followed by one of
the units in table \(lq\fBDate units\fP\(rq below. As a special case, you can
replace the sign by a \(lq\fB*\fP\(rq character, which is equivalent to giving
identical plus and minus error margins.
.
.\".TS
.\"allbox tab(|);
.\"cb cb
.\"c l .
.\"\0Unit|Description
.\"\0d|Days
.\"\0w|Weeks
.\"\0m|Months
.\"\0y|Years
.\".TE
.\".PP
.\".
.TS
allbox center tab(|);
lb c c c c c c c
lb l l l l l l l.
\0Date Unit|d|w|m|y
\0Description|Days|Weeks|Months|Years
.TE
.
.TS
allbox center tab(|);
lb c c c
lb l l l .
\0Date Unit|S|M|H
\0Description|Seconds|Minutes|Hours
.TE
.PP
\fBExample\fP: To select any messages two weeks around January 15, 2001, you'd
use the following pattern:
.
.IP
Limit to messages matching:
.IR \fB~d\fP\~15 / 1 / 2001 \fB*\fP 2 \fBw\fP
.
.PP
It is possible to give multiple error margins:
.
.IP
which cumulate:
.IR \fB~d\fP\~1 / 1 / 2001 \fB-\fP 1 \fBw+\fP 2 \fBw*\fP 3 \fBd\fP
.
.PP
.nf
.B Relative Dates
.fi
This type of date is relative to the current date, and may be specified as:
.
.RS
.TP 4
\(bu \(lq\fB<\fP\fIoffset\fP\(rq for messages newer than \fIoffset\fP units
.TQ
\(bu \(lq\fB=\fP\fIoffset\fP\(rq for messages exactly \fIoffset\fP units old
.TQ
\(bu \(lq\fB>\fP\fIoffset\fP\(rq for messages older than \fIoffset\fP units
.RE
.
.PP
\fIoffset\fP is specified as a positive number with one of the units from table
\(lq\fBDate units\fP\(rq.
.
.PP
\fBExample\fP: To select messages less than 1 month old, you would use:
.
.IP
Limit to messages matching:
.BI ~d\~< 1 m
.
.PP
\fBNote\fP: All dates used when searching are relative to the \fBlocal\fP time
zone, so unless you change the setting of your $index_format to include
a \(lq\fB%[...]\fP\(rq format, these are \fBnot\fP the dates shown in the main
index.
.
.\" --------------------------------------------------------------------
.SH CONFIGURATION VARIABLES
.\" --------------------------------------------------------------------