# phpman > man > nmh(7)

[NMH(7mh)](https://www.chedong.com/phpMan.php/man/NMH/7mh/markdown)                                                                                    [NMH(7mh)](https://www.chedong.com/phpMan.php/man/NMH/7mh/markdown)



## NAME
       nmh - new MH message system

## DESCRIPTION
       **nmh** is the name of a powerful message handling system.  Rather than being a single comprehen‐
       sive program, **nmh** consists of a collection of fairly simple single-purpose programs to  send,
       retrieve, save, and manipulate messages.

       Unlike  most  mail  clients in Unix, **nmh** is not a closed system which must be explicitly run,
       then exited when you wish to return to the shell.  You may freely  intersperse  **nmh**  commands
       with  other shell commands, allowing you to read and answer your mail while you have (for ex‐
       ample) a compilation running, or search for a file or run programs as needed to find the  an‐
       swer to someone's question before answering their mail.

       The  rest  of  this  manual entry is a quick tutorial which will teach you the basics of **nmh**.
       You should read the manual entries for the individual  programs  for  complete  documentation
       (see the section on _COMMANDS_ below).

       To  get started using **nmh**, put the directory “/usr/bin/mh” in your **$PATH**.  Run the **install-mh**
       command.  If you've never used **nmh** before, it will create the necessary default files and di‐
       rectories after asking you if you wish it to do so.

       **inc**  moves mail from your system mail drop into your **nmh** “+inbox” folder, breaking it up into
       separate files and converting it to **nmh** format.  It prints one line for each message it  pro‐
       cesses,  containing  the  from  field, the subject field and as much of the first line of the
       message as will fit.  It leaves the first message  it  processes  as  your  current  message.
       You'll need to run **inc** each time you wish to incorporate new mail into your **nmh** file.

       **scan** prints a list of the messages in your current folder.

       The commands **show**, **next**, and **prev** are used to read specific messages from the current folder.
       **show** displays the current message, or a specific message specified by  its  number  which  is
       passed as an argument.  **next** and **prev** display, respectively, the message numerically after or
       before the current message.  In all cases, the message displayed becomes the current message.
       If  there  is no current message, **show** may be called with an argument, or **next** may be used to
       advance to the first message.

       **rmm** (remove message) deletes the current message.  It may be  called,  with  message  numbers
       passed as arguments, to delete specific messages.

       **repl**  is  used  to  respond to the current message (by default).  It places you in the editor
       with a prototype response form.  While you're in the editor, you may peruse the  item  you're
       responding  to  by reading the file **@**.  After completing your response, type “l” to **list** (re‐
       view) it, or “s” to **send** it.

       **comp** allows you to compose a message by putting you in the  editor  on  a  prototype  message
       form,  and  then lets you send it via the **whatnow** command.  **whatnow** also supports easy-to-use
       management of MIME attachments via its **attach** and related responses, as described in its  man
       page.

       **nmh**  command arguments are usually called _switches_.  Some switches have a corresponding “-no”
       switch, which negates all previous occurrences of that switch on the command line.  This  al‐
       lows  a  user  to  conveniently  override,  on  the  command line, a switch in their profile.
       Switches may be abbreviated as long as there is no ambiguity with another switch of the  same
       command.   To avoid ambiguity with any switches that may be added in the future, it is recom‐
       mended that full switch names be used in durable code such as shell scripts,  functions,  and
       aliases.

       Each **nmh** command may be run with the single switch **-help**, which causes it to print its avail‐
       able switches, along with any profile components that apply, and then exit.

       All the **nmh** commands may be run with the single switch **-version**, which causes them  to  print
       the version number of the **nmh** distribution, and then exit.

       Commands which take a message number as an argument (**scan**, **show**, **repl**, ...)  also take one of
       the words “first”, “prev”, “cur”, “next”, or “last” to  indicate  (respectively)  the  first,
       previous,  current,  next, or last message in the current folder (assuming they are defined).
       As a shorthand, “.” is equivalent to “cur”.

       Commands which take a range of message numbers (**rmm**, **scan**, **show**, ...)  also take any  of  the
       abbreviations:

       _<num1>_-_<num2>_   Indicates  all  messages in the range <num1> to <num2>, inclusive.  The range
                       must be nonempty.

       all             Indicates all messages, i.e., _first_-_last_.

       _<num>_:+_N_
       _<num>_:-N        Up to _N_, where _N_ must be a positive number, messages beginning with (or  end‐
                       ing  with)  message  _num_.   _Num_  may be any of the pre-defined symbols **first**,
                       **prev**, **cur**, **next** or **last**.  The + can be omitted.

       first:_N_
       prev:_N_
       next:_N_
       last:_N_          As many of the first, previous, next, or last  N  messages  that  exist.   As
                       above,  N can be preceded with - to end the listing at the specified message,
                       or with an optional +.

       Commands that take a folder name (**inc**, **refile**, **scan,** ...) accept the folder name in two  for‐
       mats:   “+folder”  or  “@folder”.   In both cases, “folder” can be a “/”-separated path, e.g.
       “foo/bar”.  “+folder” specifies a directory path to a folder.  If “folder”  starts  with  “/”
       then  it's  an  absolute  path from the root directory.  If it is “.” or “..”, or starts with
       “./” or “../”, then it's relative to the current working directory.  Otherwise it's  relative
       to  [mh-profile(5)](https://www.chedong.com/phpMan.php/man/mh-profile/5/markdown)'s “_Path_”, i.e. as given by `**mhpath** **+**`.  “@folder” is a shorthand for “+cur‐
       folder/folder”; it's a relative path from the current folder.  “curfolder” is given  by  `**mh**‐‐
       **path**`.  For example, assuming a **Path** profile component of Mail,

       **scan** _+inbox_     scans $HOME/Mail/inbox
       **scan** _+work/todo_ scans $HOME/Mail/work/todo
       **scan** _@todo_      scans $HOME/Mail/work/todo, if current folder is +work
       **refile** _@../done_ refiles to $HOME/Mail/work/done, if the current folder is +work/todo
       **scan** _+/tmp_      scans /tmp
       **scan** _+._         scans the current directory
       **refile** _@._       refiles current message to end of current folder.

       There  are  many  other possibilities such as creating multiple folders for different topics,
       and automatically refiling messages according to subject, source,  destination,  or  content.
       These are beyond the scope of this manual entry.

## COMMANDS
       Following is a list of all the **nmh** commands, grouped loosely according to their role.

### Sending
       [_comp_(1)](https://www.chedong.com/phpMan.php/man/comp/1/markdown)         compose a message
       [_forw_(1)](https://www.chedong.com/phpMan.php/man/forw/1/markdown)         forward messages
       [_repl_(1)](https://www.chedong.com/phpMan.php/man/repl/1/markdown)         reply to a message
       [_whatnow_(1)](https://www.chedong.com/phpMan.php/man/whatnow/1/markdown)      prompting front-end for send

       Note  that although **whatnow** provides much of the primary **nmh** user interface for sending mail,
       it is almost never invoked manually, but rather is invoked indirectly by  one  of  the  above
       commands,  after  you've composed a message in your editor, and before you've decided to send
       it.  Here you can add attachments, check the recipient list,  decide  to  quit  and  send  it
       later, etc.

       Related utilities:

       [_ali_(1)](https://www.chedong.com/phpMan.php/man/ali/1/markdown)          list mail aliases
       [_anno_(1)](https://www.chedong.com/phpMan.php/man/anno/1/markdown)         annotate messages
       [_whom_(1)](https://www.chedong.com/phpMan.php/man/whom/1/markdown)         report to whom a message would go
       [_dist_(1)](https://www.chedong.com/phpMan.php/man/dist/1/markdown)         redistribute a message to additional addresses

       Advanced commands, only sometimes invoked directly:

       [_mhbuild_(1)](https://www.chedong.com/phpMan.php/man/mhbuild/1/markdown)      translate MIME composition draft
       [_send_(1)](https://www.chedong.com/phpMan.php/man/send/1/markdown)         send a message
       [_sendfiles_(1)](https://www.chedong.com/phpMan.php/man/sendfiles/1/markdown)    send multiple files in a MIME message

### Incorporating
       [_inc_(1)](https://www.chedong.com/phpMan.php/man/inc/1/markdown)          incorporate new mail

       Related utilities:

       [_burst_(1)](https://www.chedong.com/phpMan.php/man/burst/1/markdown)        explode digests into messages
       [_msgchk_(1)](https://www.chedong.com/phpMan.php/man/msgchk/1/markdown)       check for messages
       [_rcvdist_(1)](https://www.chedong.com/phpMan.php/man/rcvdist/1/markdown)      asynchronously redistribute new mail
       [_rcvpack_(1)](https://www.chedong.com/phpMan.php/man/rcvpack/1/markdown)      append message to file
       [_rcvstore_(1)](https://www.chedong.com/phpMan.php/man/rcvstore/1/markdown)     asynchronously incorporate new mail
       [_slocal_(1)](https://www.chedong.com/phpMan.php/man/slocal/1/markdown)       asynchronously filter and deliver new mail

### Viewing
       [_next_(1)](https://www.chedong.com/phpMan.php/man/next/1/markdown)         show the next message
       [_prev_(1)](https://www.chedong.com/phpMan.php/man/prev/1/markdown)         show the previous message
       [_show_(1)](https://www.chedong.com/phpMan.php/man/show/1/markdown)         show (display) messages
       [_scan_(1)](https://www.chedong.com/phpMan.php/man/scan/1/markdown)         produce a one line per message scan listing
       [_fnext_(1)](https://www.chedong.com/phpMan.php/man/fnext/1/markdown)        select the next folder with new messages
       [_fprev_(1)](https://www.chedong.com/phpMan.php/man/fprev/1/markdown)        select the previous folder with new messages

       Related utilities, only sometimes invoked directly:

       [_mhl_(1)](https://www.chedong.com/phpMan.php/man/mhl/1/markdown)          produce formatted listings of nmh messages
       [_mhlist_(1)](https://www.chedong.com/phpMan.php/man/mhlist/1/markdown)       list information about content of MIME messages
       [_mhn_(1)](https://www.chedong.com/phpMan.php/man/mhn/1/markdown)          display/list/store/cache MIME messages
       [_mhshow_(1)](https://www.chedong.com/phpMan.php/man/mhshow/1/markdown)       display MIME messages
       [_mhstore_(1)](https://www.chedong.com/phpMan.php/man/mhstore/1/markdown)      store contents of MIME messages into files

### Searching
       Within a folder:

       [_pick_(1)](https://www.chedong.com/phpMan.php/man/pick/1/markdown)         select messages by content

       Across folders:

       [_new_(1)](https://www.chedong.com/phpMan.php/man/new/1/markdown)          list folders with new messages
       [_unseen_(1)](https://www.chedong.com/phpMan.php/man/unseen/1/markdown)       list new messages in a given set of folders
       [_flist_(1)](https://www.chedong.com/phpMan.php/man/flist/1/markdown)        list folders with messages in given sequence(s)
       [_flists_(1)](https://www.chedong.com/phpMan.php/man/flists/1/markdown)       list all folders with messages in given sequence(s)
       [_folder_(1)](https://www.chedong.com/phpMan.php/man/folder/1/markdown)       set/list current folder/message
       [_folders_(1)](https://www.chedong.com/phpMan.php/man/folders/1/markdown)      list all folders

### Organizing
       [_mark_(1)](https://www.chedong.com/phpMan.php/man/mark/1/markdown)         mark messages
       [_refile_(1)](https://www.chedong.com/phpMan.php/man/refile/1/markdown)       file messages in other folders
       [_rmf_(1)](https://www.chedong.com/phpMan.php/man/rmf/1/markdown)          remove folder
       [_rmm_(1)](https://www.chedong.com/phpMan.php/man/rmm/1/markdown)          remove messages
       [_sortm_(1)](https://www.chedong.com/phpMan.php/man/sortm/1/markdown)        sort messages

### Convenience Wrappers
       [_mhmail_(1)](https://www.chedong.com/phpMan.php/man/mhmail/1/markdown)       send or read mail

### Utilities
       [_mhfixmsg_(1)](https://www.chedong.com/phpMan.php/man/mhfixmsg/1/markdown)     rewrite MIME messages with various transformations
       [_mhparam_(1)](https://www.chedong.com/phpMan.php/man/mhparam/1/markdown)      print nmh profile components
       [_mhpath_(1)](https://www.chedong.com/phpMan.php/man/mhpath/1/markdown)       print full pathnames of nmh messages and folders
       [_packf_(1)](https://www.chedong.com/phpMan.php/man/packf/1/markdown)        compress a folder into a single file
       [_prompter_(1)](https://www.chedong.com/phpMan.php/man/prompter/1/markdown)     prompting editor front end
       [_rcvtty_(1)](https://www.chedong.com/phpMan.php/man/rcvtty/1/markdown)       report new mail

### Indirectly Invoked Commands
       [_ap_(8)](https://www.chedong.com/phpMan.php/man/ap/8/markdown)           parse addresses RFC 822-style
       [_dp_(8)](https://www.chedong.com/phpMan.php/man/dp/8/markdown)           parse dates RFC 822-style
       [_fmtdump_(8)](https://www.chedong.com/phpMan.php/man/fmtdump/8/markdown)      decode [_mh-format_(5)](https://www.chedong.com/phpMan.php/man/mh-format/5/markdown) files
       [_install-mh_(8)](https://www.chedong.com/phpMan.php/man/install-mh/8/markdown)   initialize the nmh environment
       [_post_(8)](https://www.chedong.com/phpMan.php/man/post/8/markdown)         deliver a message

### Files Used by nmh Commands
       [_mh-alias_(5)](https://www.chedong.com/phpMan.php/man/mh-alias/5/markdown)     alias file for nmh message system
       [_mh-format_(5)](https://www.chedong.com/phpMan.php/man/mh-format/5/markdown)    format file for nmh message system
       [_mh-profile_(5)](https://www.chedong.com/phpMan.php/man/mh-profile/5/markdown)   user customization for nmh message system
       [_mh-tailor_(5)](https://www.chedong.com/phpMan.php/man/mh-tailor/5/markdown)    mail transport customization for nmh message system

### Formats
       [_mh-draft_(5)](https://www.chedong.com/phpMan.php/man/mh-draft/5/markdown)     draft folder facility
       [_mh-folders_(5)](https://www.chedong.com/phpMan.php/man/mh-folders/5/markdown)   nmh message storage format specification
       [_mh-mail_(5)](https://www.chedong.com/phpMan.php/man/mh-mail/5/markdown)      message format for nmh message system
       [_mh-sequence_(5)](https://www.chedong.com/phpMan.php/man/mh-sequence/5/markdown)  sequence specification for nmh message system

## FILES
       /usr/bin/mh
              contains **nmh** commands

       /etc/nmh
              contains **nmh** format files

       /usr/lib/mh
              contains **nmh** library commands

       $HOME/.mh_profile
              The user's nmh profile

## SEE ALSO
       [_install-mh_(1)](https://www.chedong.com/phpMan.php/man/install-mh/1/markdown), [_mh-profile_(5)](https://www.chedong.com/phpMan.php/man/mh-profile/5/markdown), [_mh-chart_(7)](https://www.chedong.com/phpMan.php/man/mh-chart/7/markdown), [_mh-mime_(7)](https://www.chedong.com/phpMan.php/man/mh-mime/7/markdown)

## BUGS
       Send  bug reports, questions, suggestions, and patches to <_nmh-workers@nongnu.org_>.  That mail‐
       ing list is relatively quiet, so user questions are encouraged.  Users are also encouraged to
       subscribe, and view the archives, at <https://lists.gnu.org/mailman/listinfo/nmh-workers> .

       If  problems  are encountered with an **nmh** program, they should be reported to the local main‐
       tainers of **nmh**, if any, or to the mailing list noted above.  When doing this, the name of the
       program should be reported, along with the version information for the program.

       To find out what version of an **nmh** program is being run, invoke the program with the **-version**
       switch.  This prints the version of **nmh**, the host it was compiled on, and the date  the  pro‐
       gram was linked.

       New   releases,   and   other   information   of   potential   interest,   are  announced  at
       <http://www.nongnu.org/nmh/>



nmh-1.7.1                                    2016-09-26                                     [NMH(7mh)](https://www.chedong.com/phpMan.php/man/NMH/7mh/markdown)
