NMH(7)
NMH(7) β the nmh glow-up manual, part 1 π
okay bestie, this is nmh(7), living in the Miscellaneous Information Manual section. it's the overview of the new MH message system, and honestly? it's giving foundational. grab a snack, we're doing the whole tour. π
β¨ NAME β¨
nmh β overview of the new MH message system. that's it, that's the name, slay. π
πΈ DESCRIPTION πΈ
okay so. nmh is the name of a powerful message handling system. and like, the way it does it? it's not one big bossy monolith. nope. nmh is a collection of fairly simple single-purpose programs that send, retrieve, save, and manipulate messages. tiny little specialists, each one iconic at exactly one thing. π§
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 literally never have to trap yourself inside it. You may freely intersperse nmh commands with other shell commands, allowing you to read and answer your mail while you have (for example) a compilation running, or search for a file or run programs as needed to find the answer to someone's question before answering their mail. multitasking main character energy, no cap. π
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). yes bestie, this is the trailer, not the whole movie.
To get started using nmh, put the directory /usr/bin in your $PATH. Run the install-mh command. If you've never used nmh before, it will create the necessary default files and directories after asking you if you wish it to do so. consent-first setup, we love to see it. π«Ά
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 processes, 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. so like, every time. it's not automatic. it's a ritual. β
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. look at you, moving through your inbox like it's a playlist. π₯
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 (review) it, or s to send it. reviewing before sending is self-care, periodt. π
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 allows 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 recommended that full switch names be used in durable code such as shell scripts, functions, and aliases. future-proof your scripts bestie, your future self will thank you. π
Each nmh command may be run with the single switch -help, which causes it to print its available switches, along with any profile components that apply, and then exit. built-in help, we stan. β¨
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. yes, the humble dot is doing heavy lifting. π
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. (nonempty!! don't try it!!)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 ending with) message num. Num may be any of the pre-defined symbolsfirst,prev,cur,nextorlast. 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 formats: +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)'s Path, i.e. as given by mhpath +. @folder is a shorthand for +curfolder/folder; it's a relative path from the current folder. curfolder is given by mhpath. 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. (go read the other pages, i believe in you π¦)
π COMMANDS π
Following is a list of all the nmh commands, grouped loosely according to their role.
π Sending
comp(1)β compose a messageforw(1)β forward messagesrepl(1)β reply to a messagewhatnow(1)β 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. it's the backstage crew of your email. π
Related utilities:
ali(1)β list mail aliasesanno(1)β annotate messageswhom(1)β report to whom a message would godist(1)β redistribute a message to additional addresses
Advanced commands, only sometimes invoked directly:
mhbuild(1)β translate MIME composition draftsend(1)β send a messagesendfiles(1)β send multiple files in a MIME message
π Incorporating
inc(1)β incorporate new mail
Related utilities:
burst(1)β explode digests into messagesmsgchk(1)β check for messagesrcvdist(1)β asynchronously redistribute new mailrcvpack(1)β append message to filercvstore(1)β asynchronously incorporate new mailslocal(1)β asynchronously filter and deliver new mail
π Viewing
next(1)β show the next messageprev(1)β show the previous messageshow(1)β show (display) messagesscan(1)β produce a one line per message scan listingfnext(1)β select the next folder with new messagesfprev(1)β select the previous folder with new messages
Related utilities, only sometimes invoked directly:
mhl(1)β produce formatted listings ofnmhmessagesmhlist(1)β list information about content of MIME messagesmhn(1)β display/list/store MIME messagesmhshow(1)β display MIME messagesmhstore(1)β store contents of MIME messages into files
π Searching
Within a folder:
pick(1)β select messages by content
Across folders:
new(1)β list folders with new messagesunseen(1)β list new messages in a given set of foldersflist(1)β list folders with messages in given sequence(s)flists(1)β list all folders with messages in given sequence(s)folder(1)β set/list current folder/messagefolders(1)β list all folders
π Organizing
mark(1)β mark messagesrefile(1)β file messages in other foldersrmf(1)β remove folderrmm(1)β remove messagessortm(1)β sort messages
π«Ά Convenience Wrappers
mhmail(1)β send or read mail
π§° Utilities
mhfixmsg(1)β rewrite MIME messages with various transformationsmhparam(1)β printnmhprofile componentsmhpath(1)β print full pathnames ofnmhmessages and folderspackf(1)β compress a folder into a single fileprompter(1)β prompting editor front endrcvtty(1)β report new mail
π Indirectly Invoked Commands
ap(8)β parse addresses RFC 822-styledp(8)β parse dates RFC 822-stylefmtdump(8)β decodemh-format(5)filesinstall-mh(8)β initialize thenmhenvironmentpost(8)β deliver a message
π Files Used by nmh Commands
mh-alias(5)β alias file fornmhmessage systemmh-format(5)β format file fornmhmessage systemmh-profile(5)β user customization fornmhmessage systemmh-tailor(5)β mail transport customization fornmhmessage system
β Formats
mh-draft(5)β draft folder facilitymh-folders(5)βnmhmessage storage format specificationmh-mail(5)β message format fornmhmessage systemmh-sequence(5)β sequence specification fornmhmessage system
π FILES π
/usr/binβ containsnmhcommands/etc/nmhβ containsnmhformat files/usr/libexec/nmhβ containsnmhlibrary commands$HOME/.mh_profileβ The user'snmhprofile
π₯ SEE ALSO π₯
install-mh(1), mh-profile(5), mh-chart(7), mh-mime(7)
okay that's part 1 bestie, don't go anywhere β more of this page is coming and it's lowkey essential. π
π BUGS π
okay bestie, found a bug? got a question? a lil suggestion? a patch with your whole heart in it? π send all of that to nmh-workers@nongnu.org. that mailing list is lowkey quiet (relatively quiet, fr fr), so like β please do send your user questions there, they're genuinely encouraged. and you're also encouraged to subscribe and peek the archives over at https://lists.gnu.org/mailman/listinfo/nmh-workers . it's giving community, it's giving support group, it's giving β¨.
so if you hit problems with an nmh program, report them to the local maintainers of nmh (if there are any, iykyk), or to that mailing list up there π. and when you do β and this part matters, don't skip it β include:
- the name of the program that's acting up π«Ά
- the version information for that program
no cap, a bug report without the version is like a group chat message with zero context. we're all just guessing. π
now, how do you find out what version of an nmh program you're running? easy. invoke it with the -version switch. π
that prints:
- the version of nmh β
- the host it was compiled on π₯οΈ
- the date the program was linked π
three lil facts, maximum clarity, main character energy. periodt.
and if you wanna know about new releases and other stuff that might be of potential interest to you (iconic, honestly), it all gets announced at http://www.nongnu.org/nmh/ ππ
and that's the whole page, bestie!! this was the nmh manual, version nmh-1.8, dated 2016-09-26 β go forth, read your mail, slay π
π¦πΈ
π¦ where this page comes from
- alpine 3.24: nmh-doc 1.8-r3 Β· BSD-3-Clause
- epel 10: nmh 1.8-3.el10_1 Β· BSD
- epel 9: nmh 1.8-1.el9 Β· BSD
- fedora 43: nmh 1.8-9.fc43 Β· LicenseRef-Callaway-BSD
- fedora 44: nmh 1.8-10.fc44 Β· LicenseRef-Callaway-BSD
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms