forw Command
Purpose
Forwards messages.
Syntax
forw [ +
Folder ] [ -draftfolder +
Folder | -nodraftfolder ] [ Message ] [ -draftmessage Message ] [ -digest Name [ -issue Number ] [ -volume Number ] ] [ -form FormFile ] [ -editor Editor | -noedit ] [ -whatnowproc Program | -nowhatnowproc ] [ -filterFile] [ -annotate [ -inplace | -noinplace ] | -noannotate ] [ -format| -noformat ] [ -help ]
Description
The forw command starts an interface for forwarding messages. By default, the forw command interface:
- Opens for editing a UserMhDirectory/draft file.
- Prompts the user to enter forwarding information based on the template defined in the /etc/mh/mhl.forward file.
- Prompts the user to enter any additional text that must accompany the forwarded message.
To complete editing of the UserMhDirectory/draft file, press the Ctrl-D sequence. The forw command appends the current message from the current folder to the draft file. If you want to append more than one message, use the Messages parameter.
Upon exiting the editor, the forw command starts the
What Now?
prompt. Press the Enter key to see a list of the available whatnow subcommands.
These subcommands enable you to continue to edit the message, list the message, direct the
disposition of the message, or end the processing of the forw command.
The forw command allows you to change the format of the forwarded message with the -form flag. By default, the command uses the default message format that is located in your UserMhDirectory/forwcomps file. If you have not defined your own forwcomps file, the /etc/mh/forwcomps file is used.
Use the -annotate flag to annotate the original message with forwarding information. To ensure annotation, send the forwarded note before exiting the forw command interface.
Flags
Item | Description |
---|---|
-annotate | Annotates the forwarded messages with the lines:
Use the -inplace flag to force the annotation in place. This preserves links to the annotated message. |
-digest Name | Uses the digest facility to create a new issue for the digest specified by the
Name variable. The forw command expands the format strings in
the components file (by using the same format string mechanism that is used by
the repl command) and composes the draft by using the standard digest
encapsulation algorithm. After the draft has been composed, the forw command
writes out the volume and issue entries for the digest and starts the editor. Unless you specify the -form flag, the forw command uses the format in the UserMhDirectory/digestcomps file. If this file does not exist, the command uses the default that is specified in the /etc/mh/digestcomps file. |
-draftfolder + Folder |
Places the draft message in the specified folder. If you do not specify this flag, the
forw command selects a default draft folder according to the information supplied in the
Message Handler (MH) profiles. If + Folder is not specified, the
Current-Folder is assumed. You can define a default draft folder in the
$HOME/.mh_profile file. Note: If
-draftfolder + Folder is followed by a
Message parameter, it is the same as specifying the -draftmessage flag. |
-draftmessage Message | Identifies a draft message. If you specify -draftfolder without the
-draftmessage flag, then the default message is new . |
-editor Editor | Specifies the initial editor for preparing the message. |
-filter File | Reformats each message being forwarded and places the reformatted message in the draft message. The -filter flag accepts formats that are used by the mhl command. |
+ Folder |
Specifies the folder that contains the messages you want to forward. If a folder is not
specified, Current-Folder is assumed. |
-form FormFile | Displays the forw command output in the format that is specified by the FormFile variable. The forw command treats each line in the specified file as a format string. If the -digest flag is also specified, the forw command uses the form that is specified by the File variable as the format of the digest. If the -form flag is not specified when the -digest flag is used, the digest filter file becomes the form default. |
-format | Using the mhl command and a default format file, reformats each message being forwarded and places the reformatted message in the draft message. If the UserMhDirectory/mhl.forward file exists, it contains the default format. Otherwise, the /etc/mh/mhl.forward file contains the default format. |
-help | Lists the command syntax, available switches (toggles), and version information. Note: For MH, the name of this flag must be fully spelled out.
|
-inplace | Forces annotation to be done in place to preserve links to the annotated message. |
-issue Number | Specifies the issue number of the digest. The default issue number is one greater than the
current value of the DigestName-issue-list entry in the
UserMhDirectory/context file. |
Message | Specifies a message. You can specify several messages, a range of messages, or a single
message. Use the following references when specifying messages:
The default message is the current message in the current folder. When you specify several messages, the first message that is forwarded becomes the current message. When you specify a folder, that folder becomes the current folder. |
-noannotate | Prevents annotation of the original message. This flag is the default. |
-nodraftfolder | Places the draft in the UserMhDirectory/draft file. |
-noedit | Suppresses the initial edit. |
-noformat | Prevents reformatting of the messages being forwarded. This flag is the default. |
-noinplace | Prevents annotation in place. This flag is the default. |
-nowhatnowproc | Prevents interactive processing of the forw command. With this flag, no editing occurs. |
-volume Number | Specifies the volume number of the digest. The default volume number is the current value of
the DigestName -volume-list entry in the
UserMhDirectory/context file. |
-whatnowproc Program | Starts the specified program to guide you through the forwarding tasks. Note: If you specify
the whatnow command for Program, the forw command starts an internal
whatnow procedure instead of a program with the file name whatnow.
|
Profile Entries
The following entries are entered in the UserMhDirectory/.mh_profile file:
Item | Description |
---|---|
Current-Folder: |
Sets the default current folder. |
Draft-Folder: |
Sets the default folder for drafts. |
Editor: |
Sets the default editor. |
fileproc: |
Specifies the program that is used to refile messages. |
mhlproc: |
Specifies the program that is used to filter messages being forwarded. |
Msg-Protect: |
Sets the protection level for the new message files. |
Path: |
Specifies the UserMhDirectory. |
whatnowproc: |
Specifies the program that is used to prompt What now? questions. |
Security
Examples
- To forward the current message to another person, enter:
The system prompts you to enter information in the header fields. To skip a field, press the Enter key. Enter your information in theforw
To:
field. The system responds with:
Enter the text that you want displayed before the text of the forwarded message, and press the Ctrl-D key sequence. The text of the forwarded message is displayed, and you are prompted with---------Enter initial text
What now?
Entersend
after theWhat now?
prompt to forward the message. - To forward message
5
from theinbox
folder, enter:forw +inbox 5
Files
Item | Description |
---|---|
/etc/mh/digestcomps | Defines the MH default message form when the -digest flag is specified. |
/etc/mh/mhl.forward | Contains the default MH message filter. |
UserMhDirectory/digestcomps | Specifies a user's default message form when the -digest flag is specified. (If it exists, it overrides the MH default message filter.) |
UserMhDirectory/forwcomps | Contains a user's default message form. |
UserMhDirectory/mhl.forward | Contains a user's default message filter. (If it exists, it overrides the MH default message filter.) |
/usr/bin/forw | Contains the executable form of the forw command. |
$HOME/.mh_profile | Contains the file that customizes MH for an individual user. |
UserMhDirectory/draft | Contains the draft that is created for editing messages. |
/etc/mh/forwcomps | Defines components for the messages that are created by the forw command. |