]> diplodocus.org Git - nmh/blob - man/nmh.man
new.c: Order two return statements to match comment.
[nmh] / man / nmh.man
1 .TH NMH %manext7% 2016-09-26 "%nmhversion%"
2 .
3 .\" %nmhwarning%
4 .
5 .SH NAME
6 nmh \- new MH message system
7 .
8 .\" Register 'tt' contains the indent for .TP in the COMMANDS section:
9 .nr tt \w'\fImh-sequence\fR(5)\0\0'u
10 .
11 .SH DESCRIPTION
12 .B nmh
13 is the name of a powerful message handling system. Rather than
14 being a single comprehensive program,
15 .B nmh
16 consists of a collection
17 of fairly simple single-purpose programs to send, retrieve, save,
18 and manipulate messages.
19 .PP
20 Unlike most mail clients in Unix,
21 .B nmh
22 is not a closed system which
23 must be explicitly run, then exited when you wish to return to the shell.
24 You may freely intersperse
25 .B nmh
26 commands with other shell commands,
27 allowing you to read and answer your mail while you have (for example)
28 a compilation running, or search for a file or run programs as needed
29 to find the answer to someone's question before answering their mail.
30 .PP
31 The rest of this manual entry is a quick tutorial which will teach you
32 the basics of
33 .BR nmh .
34 You should read the manual entries for the individual programs for
35 complete documentation (see the section on
36 .I COMMANDS
37 below).
38 .PP
39 To get started using
40 .BR nmh ,
41 put the directory
42 \*(lq%bindir%\*(rq
43 in your
44 .BR $PATH .
45 Run the
46 .B install-mh
47 command. If you've never used
48 .B nmh
49 before, it will create the necessary default files and directories after
50 asking you if you wish it to do so.
51 .PP
52 .B inc
53 moves mail from your system mail drop into your
54 .B nmh
55 \*(lq+inbox\*(rq
56 folder, breaking it up into separate files and converting it
57 to
58 .B nmh
59 format. It prints one line for each message it processes,
60 containing the from field, the subject field and as much of
61 the first line of the message as will fit. It leaves the first message
62 it processes as your current message. You'll need to run
63 .B inc
64 each
65 time you wish to incorporate new mail into your
66 .B nmh
67 file.
68 .PP
69 .B scan
70 prints a list of the messages in your current folder.
71 .PP
72 The commands
73 .BR show ,
74 .BR next ,
75 and
76 .B prev
77 are used to read
78 specific messages from the current folder.
79 .B show
80 displays the current message, or a specific message specified by its
81 number which is passed as an argument.
82 .B next
83 and
84 .B prev
85 display, respectively, the message numerically after or before
86 the current message. In all cases, the message displayed becomes the
87 current message. If there is no current message,
88 .B show
89 may be
90 called with an argument, or
91 .B next
92 may be used to advance to the
93 first message.
94 .PP
95 .B rmm
96 (remove message) deletes the current message. It may be called,
97 with message numbers passed as arguments, to delete specific messages.
98 .PP
99 .B repl
100 is used to respond to the current message (by default).
101 It places you in the editor with a prototype response form. While you're
102 in the editor, you may peruse the item you're responding to by reading
103 the file
104 .BR @ .
105 After completing your response, type
106 \*(lql\*(rq
107 to
108 .B list
109 (review) it, or
110 \*(lqs\*(rq
111 to
112 .B send
113 it.
114 .PP
115 .B comp
116 allows you to compose a message by putting you in the editor
117 on a prototype message form, and then lets you send it via the
118 .B whatnow
119 command.
120 .B whatnow
121 also supports easy-to-use management of MIME attachments via
122 its
123 .B attach
124 and related responses, as described in its man page.
125 .PP
126 .B nmh
127 command arguments are usually called
128 .IR switches .
129 Some switches have a corresponding \*(lq\-no\*(rq switch, which
130 negates all previous occurrences of that switch on the command line.
131 This allows a user to conveniently override, on the command line, a
132 switch in their profile. Switches may be abbreviated as long as there
133 is no ambiguity with another switch of the same command. To avoid
134 ambiguity with any switches that may be added in the future, it is
135 recommended that full switch names be used in durable code such as
136 shell scripts, functions, and aliases.
137 .PP
138 Each
139 .B nmh
140 command may be run with the single switch
141 .BR \-help ,
142 which causes it to print its available switches, along with any
143 profile components that apply, and then exit.
144 .PP
145 All the
146 .B nmh
147 commands may be run with the single switch
148 .BR \-version ,
149 which causes them to print the version number of the
150 .B nmh
151 distribution, and then exit.
152 .PP
153 Commands which take a message number as an argument
154 .RB ( scan ,
155 .BR show ,
156 .BR repl ,
157 \&...) also take one of the words \*(lqfirst\*(rq,
158 \*(lqprev\*(rq, \*(lqcur\*(rq, \*(lqnext\*(rq, or \*(lqlast\*(rq to indicate
159 (respectively) the first, previous, current, next, or last message in
160 the current folder (assuming they are defined).
161 As a shorthand, \*(lq.\*(rq is equivalent to \*(lqcur\*(rq.
162 .PP
163 Commands which take a range of message numbers
164 .RB ( rmm ,
165 .BR scan ,
166 .BR show ,
167 \&...) also take any of the abbreviations:
168 .TP \n(ttu
169 .IR <num1> - <num2>
170 Indicates all messages in the range <num1> to <num2>, inclusive.
171 The range must be nonempty.
172 .TP
173 all
174 Indicates all messages, i.e.,
175 .IR first - last .
176 .TP
177 .IR <num> :+ N
178 .PD 0
179 .TP
180 .IR <num> :\-N
181 Up to
182 .IR N ,
183 where
184 .I N
185 must be a positive number, messages beginning with (or ending with)
186 message
187 .IR num .
188 .I Num
189 may be any of the pre-defined symbols
190 .BR first ,
191 .BR prev ,
192 .BR cur ,
193 .B next
194 or
195 .BR last .
196 The + can be omitted.
197 .PD
198 .TP
199 .RI first: N
200 .PD 0
201 .TP
202 .RI prev: N
203 .TP
204 .RI next: N
205 .TP
206 .RI last: N
207 As many of the first, previous, next, or last N messages that exist.
208 As above, N can be preceded with - to end the listing at the specified
209 message, or with an optional +.
210 .PD
211 .PP
212 Commands that take a folder name
213 .RB ( inc ,
214 .BR refile ,
215 .BR scan ,
216 \&...) accept the folder name in two formats: \*(lq+folder\*(rq or
217 \*(lq@folder\*(rq. In both cases, \*(lqfolder\*(rq can be a
218 \*(lq/\*(rq-separated path, e.g.\& \*(lqfoo/bar\*(rq. \*(lq+folder\*(rq
219 specifies a directory path to a folder. If \*(lqfolder\*(rq starts
220 with \*(lq/\*(rq then it's an absolute path from the root directory.
221 If it is \*(lq.\*(rq or \*(lq..\*(rq, or starts with \*(lq./\*(rq or
222 \*(lq../\*(rq, then it's relative to the current working directory.
223 Otherwise it's relative to mh-profile(5)'s
224 .RI \*(lq Path \*(rq,
225 i.e.\& as given by
226 .RB ` "mhpath +" `.
227 \*(lq@folder\*(rq is a shorthand for \*(lq+curfolder/folder\*(rq; it's
228 a relative path from the current folder. \*(lqcurfolder\*(rq is given
229 by
230 .RB ` mhpath `.
231 For example, assuming a
232 .B Path
233 profile component of Mail,
234 .TP \n(ttu
235 .PD 0
236 .BI "scan " +inbox
237 scans $HOME/Mail/inbox
238 .TP
239 .BI "scan " +work/todo
240 scans $HOME/Mail/work/todo
241 .TP
242 .BI "scan " @todo
243 scans $HOME/Mail/work/todo, if current folder is +work
244 .TP
245 .BI "refile " @../done
246 refiles to $HOME/Mail/work/done, if the current folder is +work/todo
247 .TP
248 .BI "scan " +/tmp
249 scans /tmp
250 .TP
251 .BI "scan " +.
252 scans the current directory
253 .TP
254 .BI "refile " @.
255 refiles current message to end of current folder.
256 .PD
257 .PP
258 There are many other possibilities such as creating multiple folders
259 for different topics, and automatically refiling messages according to
260 subject, source, destination, or content. These are beyond the scope
261 of this manual entry.
262 .ne 4
263 .SH COMMANDS
264 .PP
265 Following is a list of all the
266 .B nmh
267 commands, grouped loosely according to their role.
268 .ne 4
269 .SS
270 Sending
271 .TP \n(ttu
272 .PD 0
273 .IR comp (1)
274 compose a message
275 .TP
276 .IR forw (1)
277 forward messages
278 .TP
279 .IR repl (1)
280 reply to a message
281 .TP
282 .IR whatnow (1)
283 prompting front-end for send
284 .PD
285 .PP
286 Note that although
287 .B whatnow
288 provides much of the primary
289 .B nmh
290 user interface for sending mail, it is almost never invoked manually,
291 but rather is invoked indirectly by one of the above commands, after
292 you've composed a message in your editor, and before you've decided to
293 send it. Here you can add attachments, check the recipient
294 list, decide to quit and send it later, etc.
295 .PP
296 Related utilities:
297 .TP \n(ttu
298 .PD 0
299 .IR ali (1)
300 list mail aliases
301 .TP
302 .IR anno (1)
303 annotate messages
304 .TP
305 .IR whom (1)
306 report to whom a message would go
307 .TP
308 .IR dist (1)
309 redistribute a message to additional addresses
310 .PD
311 .PP
312 Advanced commands, only sometimes invoked directly:
313 .TP \n(ttu
314 .PD 0
315 .IR mhbuild (1)
316 translate MIME composition draft
317 .TP
318 .IR send (1)
319 send a message
320 .TP
321 .IR sendfiles (1)
322 send multiple files in a MIME message
323 .PD
324 .ne 4
325 .SS
326 Incorporating
327 .TP \n(ttu
328 .IR inc (1)
329 incorporate new mail
330 .PP
331 Related utilities:
332 .TP \n(ttu
333 .PD 0
334 .IR burst (1)
335 explode digests into messages
336 .TP
337 .IR msgchk (1)
338 check for messages
339 .TP
340 .IR rcvdist (1)
341 asynchronously redistribute new mail
342 .TP
343 .IR rcvpack (1)
344 append message to file
345 .TP
346 .IR rcvstore (1)
347 asynchronously incorporate new mail
348 .TP
349 .IR slocal (1)
350 asynchronously filter and deliver new mail
351 .PD
352 .ne 4
353 .SS
354 Viewing
355 .TP \n(ttu
356 .PD 0
357 .IR next (1)
358 show the next message
359 .TP
360 .IR prev (1)
361 show the previous message
362 .TP
363 .IR show (1)
364 show (display) messages
365 .TP
366 .IR scan (1)
367 produce a one line per message scan listing
368 .TP
369 .IR fnext (1)
370 select the next folder with new messages
371 .TP
372 .IR fprev (1)
373 select the previous folder with new messages
374 .PD
375 .PP
376 Related utilities, only sometimes invoked directly:
377 .TP \n(ttu
378 .PD 0
379 .IR mhl (1)
380 produce formatted listings of nmh messages
381 .TP
382 .IR mhlist (1)
383 list information about content of MIME messages
384 .TP
385 .IR mhn (1)
386 display/list/store/cache MIME messages
387 .TP
388 .IR mhshow (1)
389 display MIME messages
390 .TP
391 .IR mhstore (1)
392 store contents of MIME messages into files
393 .PD
394 .ne 4
395 .SS
396 Searching
397 .PP
398 Within a folder:
399 .TP \n(ttu
400 .IR pick (1)
401 select messages by content
402 .PP
403 Across folders:
404 .TP \n(ttu
405 .PD 0
406 .IR new (1)
407 list folders with new messages
408 .TP
409 .IR unseen (1)
410 list new messages in a given set of folders
411 .TP
412 .IR flist (1)
413 list folders with messages in given sequence(s)
414 .TP
415 .IR flists (1)
416 list all folders with messages in given sequence(s)
417 .TP
418 .IR folder (1)
419 set/list current folder/message
420 .TP
421 .IR folders (1)
422 list all folders
423 .PD
424 .ne 4
425 .SS
426 Organizing
427 .TP \n(ttu
428 .PD 0
429 .IR mark (1)
430 mark messages
431 .TP
432 .IR refile (1)
433 file messages in other folders
434 .TP
435 .IR rmf (1)
436 remove folder
437 .TP
438 .IR rmm (1)
439 remove messages
440 .TP
441 .IR sortm (1)
442 sort messages
443 .PD
444 .ne 4
445 .SS
446 Convenience Wrappers
447 .TP \n(ttu
448 .PD 0
449 .IR mhmail (1)
450 send or read mail
451 .PD
452 .ne 4
453 .SS
454 Utilities
455 .TP \n(ttu
456 .PD 0
457 .IR mhfixmsg (1)
458 rewrite MIME messages with various transformations
459 .TP
460 .IR mhparam (1)
461 print nmh profile components
462 .TP
463 .IR mhpath (1)
464 print full pathnames of nmh messages and folders
465 .TP
466 .IR packf (1)
467 compress a folder into a single file
468 .TP
469 .IR prompter (1)
470 prompting editor front end
471 .TP
472 .IR rcvtty (1)
473 report new mail
474 .PD
475 .ne 4
476 .SS
477 Indirectly Invoked Commands
478 .TP \n(ttu
479 .PD 0
480 .IR ap (8)
481 parse addresses RFC 822\-style
482 .TP
483 .IR dp (8)
484 parse dates RFC 822\-style
485 .TP
486 .IR fmtdump (8)
487 decode
488 .IR mh-format (5)
489 files
490 .TP
491 .IR install\-mh (8)
492 initialize the nmh environment
493 .TP
494 .IR post (8)
495 deliver a message
496 .PD
497 .ne 4
498 .SS
499 Files Used by nmh Commands
500 .TP \n(ttu
501 .PD 0
502 .IR mh\-alias (5)
503 alias file for nmh message system
504 .TP
505 .IR mh\-format (5)
506 format file for nmh message system
507 .TP
508 .IR mh\-profile (5)
509 user customization for nmh message system
510 .TP
511 .IR mh\-tailor (5)
512 mail transport customization for nmh message system
513 .PD
514 .ne 4
515 .SS
516 Formats
517 .TP \n(ttu
518 .PD 0
519 .IR mh\-draft (5)
520 draft folder facility
521 .TP
522 .IR mh\-folders (5)
523 nmh message storage format specification
524 .TP
525 .IR mh\-mail (5)
526 message format for nmh message system
527 .TP
528 .IR mh\-sequence (5)
529 sequence specification for nmh message system
530 .PD
531 .ne 4
532 .SH FILES
533 .TP
534 %bindir%
535 contains
536 .B nmh
537 commands
538 .TP
539 %nmhetcdir%
540 contains
541 .B nmh
542 format files
543 .TP
544 %nmhlibexecdir%
545 contains
546 .B nmh
547 library commands
548 .TP
549 $HOME/.mh_profile
550 The user's nmh profile
551 .ne 4
552 .SH "SEE ALSO"
553 .IR install-mh (1),
554 .IR mh-profile (5),
555 .IR mh-chart (7),
556 .IR mh-mime (7)
557 .ne 4
558 .SH BUGS
559 \" The contents of this section also appear in sbr/print_help.c .
560 Send bug reports, questions, suggestions, and patches to
561 .IR nmh-workers@nongnu.org .
562 That mailing list is relatively quiet, so user questions are encouraged.
563 Users are also encouraged to subscribe, and view the archives, at
564 https://lists.gnu.org/mailman/listinfo/nmh-workers .
565 .PP
566 If problems are encountered with an
567 .B nmh
568 program, they should
569 be reported to the local maintainers of
570 .BR nmh ,
571 if any, or to the mailing list noted above.
572 When doing this, the name of the program should be reported, along
573 with the version information for the program.
574 .PP
575 To find out what version of an
576 .B nmh
577 program is being run, invoke
578 the program with the
579 .B \-version
580 switch. This prints
581 the version of
582 .BR nmh ,
583 the host it was compiled on, and the date the
584 program was linked.
585 .PP
586 New releases, and other information of potential interest, are announced at http://www.nongnu.org/nmh/