DIST(1mh)
π NAME π
okay bestie, welcome to dist β it's from the nmh manual (section 1mh) and what it does is: distribute an nmh message to additional addresses. slay. let's get into it β¨
πΈ SYNOPSIS πΈ
dist [-help] [-version] [+folder] [msg] [-form formfile] [-annotate |
-noannotate] [-inplace | -noinplace] [-draftfolder +folder]
[-draftmessage msg] [-nodraftfolder] [-editor editor] [-noedit]
[-width columns] [-from address] [-to address] [-cc address] [-fcc
+folder] [-whatnowproc program] [-nowhatnowproc] [-atfile]
[-noatfile]
β¨ DESCRIPTION β¨
so dist is literally similar to forw. what it does is it prepares the message you picked for redistribution to addresses that (presumably) are not on the original address list. it's giving "hi again, but to different people" π
the default message form contains these elements, periodt:
Resent-From: {from switch} or <Local-Mailbox> or <username@hostname>
Resent-To: {to switch} or blank
Resent-cc: {cc switch} or blank
Resent-fcc: {fcc switch} or blank
if there's a file named distcomps sitting in your nmh directory, that one gets used instead of the default form β your house, your rules π β¨ you can also point at an alternate forms file with the switch -form formfile. forms get processed through the nmh template system, so go read mh-format(5) for the deets. and heads up: components from the redistributed message are available as standard component escapes in the forms file π
on top of the standard mh-format(5) escapes, these component escapes are also supported:
fccβ returns string β any folders specified with-fcc foldernmh-fromβ returns string β addresses specified with-from addressnmh-toβ returns string β addresses specified with-to addressnmh-ccβ returns string β addresses specified with-cc address
and for descriptions of the -from, -to, -cc, and -fcc switches, go see forw(1). iykyk π
if the draft already exists, dist will ask you about the disposition of the draft. a reply of quit will abort dist, leaving the draft intact; replace will replace the existing draft with a blank skeleton; and list will display the draft. choose wisely bestie π
only those addresses in Resent-To:, Resent-cc:, and Resent-Bcc: will be sent. also, a Resent-Fcc: folder will be honored (see send(1)). note that with dist, the draft should contain only Resent-xxx: fields and no body. the headers and the body of the original message are copied to the draft when the message is sent. use care in constructing the headers for the redistribution β no cap, be careful here π
because the draft is minimal, the prompter(1) editor is quite useful with dist. iconic teamwork fr fr π€
if the -annotate switch is given, the message being distributed will be annotated with the lines:
Resent: date
Resent: addrs
where each address list contains as many lines as required. this annotation will be done only if the message is sent directly from dist. if the message is not sent immediately from dist, comp -use may be used to re-edit and send the constructed message, but the annotations won't take place π normally annotations are done in place in order to preserve any links to the message. you may use the -noinplace switch to change this.
see comp(1) for a description of the -editor and -noedit switches. note that while in the editor, with -atfile and if the current directory is writable, the message being resent is available through a link named @ (assuming the default whatnowproc). in addition, the actual pathname of the message is stored in the environment variable $editalt, and the pathname of the folder containing the message is stored in the environment variable $mhfolder. the creation of the @ file is controlled via the -atfile and -noatfile options. main character energy for real π¦
the -draftfolder +folder and -draftmessage msg switches invoke the nmh draft folder facility. this is an advanced (and highly useful) feature. consult mh-draft(5) for more information. it's giving pro-level, bestie π
upon exiting from the editor, dist will invoke the whatnow program. see whatnow(1) for a discussion of available options. the invocation of this program can be inhibited by using the -nowhatnowproc switch. (in fact, it is the whatnow program which starts the initial edit. hence, -nowhatnowproc will prevent any edit from occurring.) not me telling you that up front π₯
π FILES π
/etc/nmh/distcompsβ the default message skeleton.<mh-dir>/distcompsβ the user's message skeleton.$HOME/.mh_profileβ the user's profile.<mh-dir>/draftβ the draft file.
π§ PROFILE COMPONENTS π§
Path:β to determine the user's nmh directory.Current-Folder:β to find the default current folder.Draft-Folder:β to specify the default draftfolder.Editor:β to override the default editor.fileproc:β program to refile the message.whatnowproc:β program to ask the "What now?" questions.
π SEE ALSO π
comp(1), forw(1), mh-draft(5), prompter(1), repl(1), send(1), whatnow(1)
π DEFAULTS π
+folderβ the current folder.msgβ the current message.-noannotate-nodraftfolder-inplace-noatfile
β CONTEXT β
if a folder is given, it will become the current folder. the message distributed will become the current message. simple as that β¨
π HISTORY π
dist originally used headers of the form Distribute-xxx: instead of Resent-xxx:. in order to conform with the ARPA Internet standard, RFC 822, the Resent-xxx: form is now used. dist will recognize Distribute-xxx: type headers and automatically convert them to Resent-xxx:. glow-up era π
π BUGS π
dist does not rigorously check the message being distributed for adherence to the transport standard, but post called by send does. the post program will balk (and rightly so) at poorly formatted messages, and dist won't correct things for you. so likeβ¦ it's not gonna hold your hand, bestie π
if whatnowproc is whatnow, then comp uses a built-in whatnow, it does not actually run the whatnow program. hence, if you define your own whatnowproc, don't call it whatnow since comp won't run it. important!!! don't do it π
okay that's the whole page, you ate that π«Ά go distribute some messages, you've got this π
this has been dist from nmh-1.8, dated 2022-12-22 β mwah, catch you in the next manpage ππβ¨
π¦ where this page comes from
- debian trixie: nmh 1.8-3
- ubuntu noble: nmh 1.8-1build4
- ubuntu questing: nmh 1.8-3
- ubuntu resolute: nmh 1.8-4
- ubuntu stonking: nmh 1.8-4build1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms