man > forw(1)

πŸ“› NAME

forw - forward nmh messages

πŸš€ Quick Reference

Use CaseCommandDescription
πŸ“€ Forward current messageforwForwards the current message in the current folder
πŸ“‚ Forward a specific messageforw +folder 42Forwards message number 42 from the given folder
✨ Forward with formattingforw -formatApplies the default mhl filter to make the forwarded message look nicer
πŸ“§ Forward with MIME encapsulationforw -mimeGenerates an mhbuild composition file; you must later type mime at the β€œWhat now?” prompt
πŸ“° Forward as digest issueforw -digest mylist -issue 1 -volume 2Creates a digest (issue) with volume/issue numbers
🏷️ Annotate original messagesforw -annotateMarks each original message with β€œForwarded:” lines after sending
πŸ”§ Build without sending (Emacs)forw -buildCreates the draft but does not send; no editor or whatnow prompt
πŸ“Ž Forward from a fileforw -file msgfileForwards the exact file as a message body, bypassing filters
✏️ Custom recipients and subjectforw -to user@example.com -cc copy@example.com -subject "Fwd: important"Sets To, Cc, and Subject fields

πŸ“‹ 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

forw constructs a new message from a forms (components) file, with a body composed of the message(s) to be forwarded. An editor is invoked and, after editing is complete, the user is prompted before the message is sent.

The default message template will direct forw to construct the draft as follows:

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 a file named β€œforwcomps” exists in the user’s nmh directory, it will be used instead of this default form. You may also specify an alternate forms file with the switch -form formfile. Forms are processed via the nmh template system; see mh-format(5) for details. Components from the first forwarded message are available as standard component escapes in the forms file.

πŸ’  Component Escapes

In addition to the standard mh-format escapes, the following component escapes are also supported:

EscapeReturnsDescription
fccstringAny folders specified with `-fcc folder'
nmh-fromstringAddresses specified with `-from address'
nmh-tostringAddresses specified with `-to address'
nmh-ccstringAddresses specified with `-cc address'
nmh-subjectstringAny text specified with `-subject text'

πŸ“ By default, the β€œTo:” and β€œcc:” fields are empty. You may add addresses to these fields with the -to address and -cc address switches. You may give these switches multiple times to add multiple addresses.

πŸ“§ By default, the β€œFrom:” field contains either the value of the Local-Mailbox profile entry, or a system default email address. This default can be overridden by using the -from address switch. The default mailbox in the β€œFcc:” field is +outbox. This can be overridden by the -fcc switch.

πŸ“Œ Any text given to the -subject switch will be placed in the β€œSubject:” field in the draft.

πŸ—‚οΈ If the draft already exists, forw will ask you as to the disposition of the draft. A reply of quit will abort forw, leaving the draft intact; replace will replace the existing draft with a blank skeleton; and list will display the draft.

🏷️ -annotate

If the -annotate switch is given, each message being forwarded will be annotated with the lines:

Forwarded: date
Forwarded: addrs

where each address list contains as many lines as required. This annotation will be done only if the message is sent directly from forw. If the message is not sent immediately from forw, β€œ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 change this by using the -noinplace switch.

✏️ Editor

See comp(1) for a description of the -editor and -noedit switches.

πŸ“‹ Message Filtering

Although forw uses a forms (components) file to construct the initial draft, a message filter file is used to format each forwarded message in the body of the draft. The filter file for forw should be a standard form file for mhl(1), as forw will invoke mhl to filter (re-format) the forwarded messages prior to being output to the body of the draft.

The switches -noformat, -format, and -filter filterfile specify which message filter file to use. If -noformat is specified (this is the default), then each forwarded message is output into the draft exactly as it appears, with no mhl filtering. If -format is specified, then the following default message filter file, β€œmhl.forward”, which should be adequate for most users, is 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 the user’s nmh directory, it will be used instead. You may specify an alternate message filter file with the switch -filter filterfile.

πŸ”– Dash Stuffing

Each forwarded message is separated with an encapsulation delimiter. By default, any dashes in the first column of the forwarded messages will be prepended with `- ' so that when received, the message is suitable for bursting by burst(1). This follows the guidelines in RFC 934. You may 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.

πŸ“§ MIME Encapsulation

To use the MIME rules for encapsulation, specify the -mime switch. This directs forw to generate an mhbuild composition file. Note that nmh will not invoke mhbuild automatically; you must specifically give the command

What now? mime

prior to sending the draft.

πŸ“ Draft Folder Facility

The -draftfolder +folder and -draftmessage msg switches invoke the nmh draft folder facility. This is an advanced (and highly useful) feature. Consult the mh-draft(5) man page for more information.

πŸ€– whatnowproc

The -editor editor switch indicates the 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 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.)

πŸ”§ -build

The -build switch is intended 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 the user for editing. No mail is actually sent.

πŸ“Ž -file

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. The same caveats apply to this option as to the -build switch.

πŸ“° Digest Facility

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:

TypeEscapeReturnsDescription
componentdigeststringArgument to `-digest'
functioncurintegerArgument to `-volume'
functionmsgintegerArgument to `-issue'

πŸ“ FILES

forw looks for format and filter files in multiple locations: absolute pathnames are accessed directly, tilde expansion is done on usernames, and files are searched for in the user’s Mail directory as specified in their profile. If not found there, the directory β€œ/etc/nmh” is checked.

πŸ”§ PROFILE COMPONENTS

πŸ”— SEE ALSO

burst(1) πŸ”—, comp(1) πŸ”—, mh-format(5) πŸ”—, mhbuild(1) πŸ”—, mhl(1) πŸ”—, prompter(1) πŸ”—, repl(1) πŸ”—, send(1) πŸ”—, whatnow(1) πŸ”—

Proposed Standard for Message Encapsulation (RFC 934)

βš™οΈ DEFAULTS

🧭 CONTEXT

If a folder is given, it will become the current folder. The first message forwarded will become the current message.

πŸ› BUGS

If whatnowproc is whatnow, then forw 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 forw won’t run it.

When forw is told to annotate the messages it forwards, it doesn’t actually annotate them until the draft is successfully sent. If, from the whatnowproc, you push instead of send, it is possible to confuse forw by re-ordering the file (e.g. by using β€œfolder -pack”) before the message is successfully sent. dist and repl don’t have this problem.

forw(1)
πŸ“› NAME πŸš€ Quick Reference πŸ“‹ SYNOPSIS πŸ“ DESCRIPTION
πŸ’  Component Escapes 🏷️ -annotate ✏️ Editor πŸ“‹ Message Filtering πŸ”– Dash Stuffing πŸ“§ MIME Encapsulation πŸ“ Draft Folder Facility πŸ€– whatnowproc πŸ”§ -build πŸ“Ž -file πŸ“° Digest Facility
πŸ“ FILES πŸ”§ PROFILE COMPONENTS πŸ”— SEE ALSO βš™οΈ DEFAULTS 🧭 CONTEXT πŸ› BUGS

Generated by phpman v4.9.27 · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-07-18 20:39 @2600:1f28:365:80b0:b91e:58eb:6587:15c8
CrawledBy CCBot/2.0 (https://commoncrawl.org/faq/)
Valid XHTML 1.0 Transitional!Valid CSS!
Enhanced by LLM: deepseek-v4-flash / taotoken.net / www.chedong.com - original format

^_top_^