NMH(7mh)

πŸ“¦
version 1.8 Β· 3 versions
, in debian trixie, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

NMH(7mh) πŸ’… β€” nmh overview πŸ¦‹


πŸŽ€ NAME πŸŽ€

nmh β€” okay bestie, this is the overview of the new MH message system πŸ’– no cap.


πŸ’– DESCRIPTION πŸ’–

so nmh is literally the name of a powerful message handling system πŸ’… and the way it works is not one big comprehensive program β€” instead it's a collection of fairly simple, single-purpose programs that send, retrieve, save, and manipulate messages. it's giving modular queen energy ✨

unlike most mail clients in Unix, nmh is not a closed system that you have to explicitly run and then exit when you wanna go back to the shell 😭 you can freely intersperse nmh commands with other shell commands, so you can 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. main character multitasking behavior fr fr 🫢

the rest of this manual entry is a quick tutorial that 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). iykyk.

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 directories after asking you if you wish it to do so. so polite of 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. periodt.

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. iconic.

rmm (remove message) deletes the current message πŸ’€ it may be called, with message numbers passed as arguments, to delete specific messages. bye bye bestie.

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. slay.

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. obsessed.

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. no cap.

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 πŸ’…

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. periodt.

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 ending 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 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. maybe part 2? πŸ‘€


✨ COMMANDS ✨

following is a list of all the nmh commands, grouped loosely according to their role πŸŽ€

πŸ’Œ Sending πŸ’Œ

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. so handy πŸ’…

  • ali(1) β€” list mail aliases
  • anno(1) β€” annotate messages
  • whom(1) β€” report to whom a message would go
  • dist(1) β€” redistribute a message to additional addresses

πŸš€ Advanced commands, only sometimes invoked directly: πŸš€

πŸ“₯ Incorporating πŸ“₯

  • inc(1) β€” incorporate new mail
  • burst(1) β€” explode digests into messages
  • msgchk(1) β€” check for messages
  • rcvdist(1) β€” asynchronously redistribute new mail
  • rcvpack(1) β€” append message to file
  • rcvstore(1) β€” asynchronously incorporate new mail
  • slocal(1) β€” asynchronously filter and deliver new mail

πŸ‘€ Viewing πŸ‘€

  • next(1) β€” show the next message
  • prev(1) β€” show the previous message
  • show(1) β€” show (display) messages
  • scan(1) β€” produce a one line per message scan listing
  • fnext(1) β€” select the next folder with new messages
  • fprev(1) β€” select the previous folder with new messages
  • mhl(1) β€” produce formatted listings of nmh messages
  • mhlist(1) β€” list information about content of MIME messages
  • mhn(1) β€” display/list/store MIME messages
  • mhshow(1) β€” display MIME messages
  • mhstore(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 messages
  • unseen(1) β€” list new messages in a given set of folders
  • flist(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/message
  • folders(1) β€” list all folders

πŸ—‚οΈ Organizing πŸ—‚οΈ

🎁 Convenience Wrappers 🎁

🧰 Utilities 🧰

  • mhfixmsg(1) β€” rewrite MIME messages with various transformations
  • mhparam(1) β€” print nmh profile components
  • mhpath(1) β€” print full pathnames of nmh messages and folders
  • packf(1) β€” compress a folder into a single file
  • prompter(1) β€” prompting editor front end
  • rcvtty(1) β€” report new mail

πŸ›Έ Indirectly Invoked Commands πŸ›Έ

πŸ“ Files Used by nmh Commands πŸ“

  • mh-alias(5) β€” alias file for nmh message system
  • mh-format(5) β€” format file for nmh message system
  • mh-profile(5) β€” user customization for nmh message system
  • mh-tailor(5) β€” mail transport customization for nmh message system

🎨 Formats 🎨


πŸ“ 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 πŸ‘€

πŸ› BUGS (yes bestie, we WANT your emails) πŸ›

Okay so if you found a bug, or you have a question, a suggestion, or honestly a whole patch you wrote at 2am β€” send it ALL to:

nmh-workers@nongnu.org

Real talk: that mailing list is relatively quiet, which means your questions are super encouraged β€” like please ask, nobody's gonna be weird about it. 🫢

You're also encouraged to subscribe and peek the archives over at:

https://lists.gnu.org/mailman/listinfo/nmh-workers

πŸ’Œ if a specific program is acting up

If you hit problems with an actual nmh program, report it to the local maintainers of nmh if there are any β€” otherwise it goes to the mailing list up above. πŸ‘‘

And when you do that, bestie, include:

  • the name of the program that's being rude πŸ’€
  • the version information for that program 🌸

πŸ” how do I even find my version tho

Easy. Invoke the program with the -version switch, and it'll print out:

  • the version of nmh
  • the host it was compiled on
  • the date the program was linked

Iconic. No cap, that's your receipt. 🧾✨


πŸ“£ where the news drops

New releases and other stuff you might lowkey care about get announced at:

http://www.nongnu.org/nmh/

That's the whole vibe check, bestie β€” this page was nmh-1.8, dated 2016-09-26, and it lives as NMH(7mh) in the manuals. Go forth and file those bugs, you absolute legend. πŸ’…πŸ¦‹

πŸ“¦ where this page comes from