FORW(1)
π FORW(1) β the forward-y one π
okay bestie, welcome to forw from the General Commands Manual section β yes we're doing manpage lore today and honestly? iconic. π
β¨ NAME β¨
forw β forward nmh messages π
β¨ SYNOPSIS β¨
forw [-help] [-version] [+folder] [msgs] [-annotate | -noannotate]
[-form formfile] [-format | -noformat] [-filter filterfile]
[-inplace | -noinplace] [-mime | -nomime] [-draftfolder +folder]
[-draftmessage msg] [-nodraftfolder] [-editor editor] [-noedit]
[-width columns] [-from address] [-to address] [-cc address] [-fcc
+folder] [-subject text] [-whatnowproc program] [-nowhatnowproc]
[-dashstuffing | -nodashstuffing] [-build] [-file msgfile]
forw [-help] [-version] [+folder] [msgs] [-digest list] [-issue number]
[-volume number] [other switches for forw]
β¨ DESCRIPTION β¨
So here's the vibe: forw builds a whole new message out of a forms (components) file, and the body of that message is literally the message(s) you're forwarding. π¨ An editor gets invoked, and once you're done editing, the user gets prompted before anything actually sends. No surprise sends here, we don't do that. π
The default message template tells forw to construct the draft like this:
From: {from switch} or <Local-Mailbox> or <username@hostname>
To: {to switch} or blank
Fcc: {fcc switch} or +outbox
Subject: {subject switch} or "{original subject} (fwd)"
--------
If there's a file called βforwcompsβ sitting in your nmh directory, that one gets used instead of the default form. πΈ You can also point at a different forms file with the switch -form formfile. Forms get processed through the nmh template system; peep mh-format(5) for the deets. And the components from the first forwarded message are available as standard component escapes in the forms file. π
Now, on top of the standard mh-format 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 addressnmh-subjectβ returns string β any text specified with-subject text
By default the βTo:β and βcc:β fields are justβ¦ empty. πΆ You add addresses to them with the -to address and -cc address switches. And you can hand these switches over multiple times to stack up multiple addresses β go off, add everybody. π«Ά
By default the βFrom:β field holds either the value of the Local-Mailbox profile entry, or a system default email address. That default can be overridden with the -from address switch. The default mailbox in the βFcc:β field is +outbox. You can override that with the -fcc switch. π
Any text you give to the -subject switch lands in the βSubject:β field of the draft. periodt.
If a draft already exists, forw is gonna ask you what you wanna do about it. Your options:
quitβ abortsforw, leaves the draft intact, no harm done πreplaceβ swaps the existing draft out for a blank skeletonlistβ displays the draft so you can look at it
If the -annotate switch is given, every message being forwarded gets annotated with these lines:
Forwarded: date
Forwarded: addrs
β¦where each address list contains as many lines as required. β οΈ This annotation only happens if the message is sent directly from forw. If it's not sent immediately from forw, you can use comp -use to re-edit and send the constructed message, but the annotations won't take place β sorry bestie, that's just the rules. Normally annotations are done in place so any links to the message stay preserved. You can change that with the -noinplace switch.
For a description of the -editor and -noedit switches, go look at comp(1). π¦
So even though forw uses a forms (components) file to construct the initial draft, a message filter file is what formats each forwarded message in the body of the draft. The filter file for forw should be a standard form file for mhl(1), because forw will invoke mhl to filter (re-format) the forwarded messages before they get output to the body of the draft.
The switches -noformat, -format, and -filter filterfile decide which message filter file gets used. If -noformat is specified (this is the default), then each forwarded message gets output into the draft exactly as it appears, with no mhl filtering. If -format is specified, then this default message filter file β βmhl.forwardβ, which should be adequate for most users β gets used:
; mhl.forward
;
; default message filter for `forw' (forw -format)
;
width=80,overflowtext=,overflowoffset=10
leftadjust,compress,compwidth=9
Date:formatfield="%<(nodate{text})%{text}%|%(tws{text})%>"
From:
To:
cc:
Subject:
:
body:nocomponent,overflowoffset=0,noleftadjust,nocompress
If a file named βmhl.forwardβ exists in your nmh directory, that one gets used instead. You can also specify an alternate message filter file with the switch -filter filterfile. π
Each forwarded message is separated with an encapsulation delimiter. By default, any dashes in the first column of the forwarded messages get prepended with `- ' so that when received, the message is suitable for bursting by burst(1). This follows the guidelines in RFC 934. You can use the -nodashstuffing switch to suppress this form of quoting. π
Users of prompter(1) can, by specifying prompter's -prepend switch in the .mh_profile file, prepend any commentary text before the forwarded messages. cute!
To use the MIME rules for encapsulation, specify the -mime switch. This directs forw to generate an mhbuild composition file. β οΈ Heads up: nmh will not invoke mhbuild automatically; you must specifically give the command
What now? mime
prior to sending the draft. Don't forget, bestie, or it just won't happen. π
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 info. π
The -editor editor switch says which editor to use for the initial edit. Upon exiting from the editor, comp will invoke the whatnow program. See whatnow(1) for a discussion of the available options. The invocation of this program can be inhibited with the -nowhatnowproc switch. (Fun fact: it's actually the whatnow program that starts the initial edit. So -nowhatnowproc will prevent any edit from occurring. wild.) π€―
The -build switch is meant to be used by the Emacs mh-e interface to nmh. It implies -nowhatnowproc. It causes a file <mh-dir>/draft to be created, containing the draft message that would normally be presented to you for editing. No mail is actually sent. π
The -file msgfile switch specifies the message to be forwarded as an exact filename rather than as an nmh folder and message number. This switch implies -noannotate. The forwarded message is simply copied verbatim into the draft; the processing implied by the -filter, -mime, and -digest switches is bypassed, and the usual leading and trailing 'Forwarded Message' delimiters are not added. Same caveats apply to this option as to the -build switch. π«
The -digest list, -issue number, and -volume number switches implement a digest facility for nmh. Specifying these switches enables and/or overloads the following escapes:
- type
component, escapedigest, returns string β argument to-digest - type
function, escapecur, returns integer β argument to-volume - type
function, escapemsg, returns integer β argument to-issue
β¨ FILES β¨
forw looks for format and filter files in multiple locations, bestie: absolute pathnames are accessed directly, tilde expansion is done on usernames, and files are searched for in your Mail directory as specified in your profile. If it's not found there, the directory β/etc/nmhβ gets checked. π
/etc/nmh/forwcompsβ the default message skeleton.<mh-dir>/forwcompsβ your message skeleton./etc/nmh/digestcompsβ the default message skeleton if-digestis given.<mh-dir>/digestcompsβ your-digestskeleton.^/etc/nmh/mhl.forwardβ the default message filter.<mh-dir>/mhl.forwardβ your message filter.^$HOME/.mh_profileβ your profile.
β¨ PROFILE COMPONENTS β¨
Path:β to determine your nmh directory.Current-Folder:β to find the default current folder.Draft-Folder:β to specify the default draftfolder.Editor:β to override the default editor.Msg-Protect:β to set mode when creating a new message (draft).fileproc:β program to refile the message.mhlproc:β program to filter messages being forwarded.whatnowproc:β program to ask the βWhat now?β questions.
β¨ SEE ALSO β¨
burst(1), comp(1), mh-draft(5), mh-format(5), mhbuild(1), mhl(1), prompter(1), repl(1), send(1), whatnow(1)
Proposed Standard for Message Encapsulation (RFC 934)
β¨ DEFAULTS β¨
+folderβ the current folder.msgsβ the current message.-noannotate-nodraftfolder-noformat-inplace-dashstuffing-nomime
β¨ CONTEXT β¨
If a folder is given, it becomes the current folder. The first message forwarded becomes the current message. β¨
β¨ BUGS β¨
Ifwhatnowprociswhatnow, thenforwuses a built-inwhatnowβ it does not actually run thewhatnowprogram. So if you define your ownwhatnowproc, don't call itwhatnow, becauseforwwon't run it. π
Whenforwis told to annotate the messages it forwards, it doesn't actually annotate them until the draft is successfully sent. If, from thewhatnowproc, you push instead of send, it is possible to confuseforwby re-ordering the file (e.g. by using βfolder -packβ) before the message is successfully sent.distandrepldon't have this problem. π
okay that's the whole thing, bestie, you're officially a forw girlie now ππ
this page came from nmh-1.8, dated 2022-12-22, and it's the FORW(1) page from the General Commands Manual β go forward something iconic, mwah ππβ¨
π¦ 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