]> diplodocus.org Git - nmh/blobdiff - man/forw.man
Replace getcpy() with mh_xstrdup() where the string isn't NULL.
[nmh] / man / forw.man
index 5b7dc6de4d924ad7483ec26eac70896bd2a2775b..6534f05034c90159a81e8e2bab62f0739b278190 100644 (file)
@@ -1,16 +1,18 @@
+.TH FORW %manext1% "October 10, 2016" "%nmhversion%"
 .\"
 .\" %nmhwarning%
 .\"
-.TH FORW %manext1% "%nmhdate%" MH.6.8 [%nmhversion%]
 .SH NAME
 forw \- forward messages
 .SH SYNOPSIS
 .HP 5
 .na
 .B forw
+.RB [ \-help ]
+.RB [ \-version ]
 .RI [ +folder ]
 .RI [ msgs ]
-.RB [ \-annotate " | " \-noannotate ] 
+.RB [ \-annotate " | " \-noannotate ]
 .RB [ \-form
 .IR formfile ]
 .RB [ \-format " | " \-noformat ]
@@ -26,6 +28,18 @@ forw \- forward messages
 .RB [ \-editor
 .IR editor ]
 .RB [ \-noedit ]
+.RB [ \-width
+.IR colums ]
+.RB [ \-from
+.IR address ]
+.RB [ \-to
+.IR address ]
+.RB [ \-cc
+.IR address ]
+.RB [ \-fcc
+.IR +folder ]
+.RB [ \-subject
+.IR text ]
 .RB [ \-whatnowproc
 .IR program ]
 .RB [ \-nowhatnowproc ]
@@ -33,11 +47,11 @@ forw \- forward messages
 .RB [ \-build ]
 .RB [ \-file
 .IR msgfile ]
-.RB [ \-version ]
-.RB [ \-help ]
 .PP
 .HP 5
 .B forw
+.RB [ \-help ]
+.RB [ \-version ]
 .RI [ +folder ]
 .RI [ msgs ]
 .RB [ \-digest
@@ -48,8 +62,6 @@ forw \- forward messages
 .IR number ]
 [other\ switches\ for\ 
 .BR forw ]
-.RB [ \-version ]
-.RB [ \-help ]
 .ad
 .SH DESCRIPTION
 .B Forw
@@ -62,11 +74,17 @@ as in
 and after editing is complete, the user is prompted
 before the message is sent.
 .PP
-The default message form contains the following elements:
+The default message template will direct
+.B forw
+to construct the draft as follows:
 .PP
 .RS 5
 .nf
-%forwcomps%
+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)"
+--------
 .fi
 .RE
 .PP
@@ -77,6 +95,56 @@ it will be used instead of this default form.  You may also specify an
 alternate forms file with the switch
 .B \-form
 .IR formfile .
+Forms are processed via the
+.B nmh
+template system; see
+.IR mh\-format (5)
+for details.  Components from the first forwarded message are available
+as standard component escapes in the forms file.
+.PP
+In addition to the standard
+.IR mh\-format (5)
+escapes, the following
+.I component
+escapes are also supported:
+.PP
+.RS 5
+.nf
+.ta \w'nmh\-subject    'u +\w'Returns  'u
+.I "Escape     Returns Description"
+fcc    string  Any folders specified with `\-fcc\ folder'
+nmh\-from      string  Addresses specified with `\-from\ address'
+nmh\-to        string  Addresses specified with `\-to\ address'
+nmh\-cc        string  Addresses specified with `\-cc\ address'
+nmh\-subject   string  Any text specified with `\-subject\ text'
+.fi
+.RE
+.PP
+By default the \*(lqTo:\*(rq and \*(lqcc:\*(rq fields are empty.  You may
+add addresses to these fields with the
+.B \-to
+.I address
+and
+.B \-cc
+.I address
+switches.  You may give these switches multiple times to add multiple
+addresses.
+.PP
+By default the \*(lqFrom:\*(rq field has either the value of the
+.B Local\-Mailbox
+profile entry a system default email address.  This default can be overridden
+by using the
+.B \-from
+.I address
+switch.  The default mailbox in the \*(lqFcc:\*(rq field is
+.IR +outbox .
+This can be overridden by the
+.B \-fcc
+switch.
+.PP
+Any text you give to the
+.B \-subject
+switch will be placed in the \*(lqSubject:\*(rq field in the draft.
 .PP
 If the draft already exists,
 .B forw
@@ -118,7 +186,7 @@ change this by using the
 switch.
 .PP
 See
-.BR comp (1)
+.IR comp (1)
 for a description of the
 .B \-editor
 and
@@ -182,7 +250,7 @@ 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
 .BR burst .
-This follows the Internet RFC\-934 guidelines.  You may use the flag
+This follows the Internet RFC 934 guidelines.  You may use the flag
 .B \-nodashstuffing
 in order
 to suppress this form of quoting to the forwarded messages.
@@ -199,26 +267,15 @@ before the forwarded messages.  (A major win!)
 .PP
 To use the MIME rules for encapsulation, specify the
 .B \-mime
-switch. This directs
+switch.  This directs
 .B forw
 to generate an
 .B mhbuild
-composition file. Note that
+composition file.  Note that
 .B nmh
 will not invoke
 .B mhbuild
-automatically, unless you
-add this line to your
-.I \&.mh\(ruprofile
-file:
-.PP
-.RS 5
-.nf
-automimeproc: 1
-.fi
-.RE
-.PP
-Otherwise, you must specifically give the command
+automatically; you must specifically give the command
 .PP
 .RS 5
 .nf
@@ -238,7 +295,7 @@ switches invoke the
 .B nmh
 draft folder facility.  This is an advanced (and highly
 useful) feature.  Consult the
-.BR mh-draft (5)
+.IR mh-draft (5)
 man page for more information.
 .PP
 The
@@ -250,7 +307,7 @@ initial edit.  Upon exiting from the editor,
 will invoke the
 .B whatnow
 program.  See
-.BR whatnow (1)
+.IR whatnow (1)
 for a discussion of
 available options.  The invocation of this program can be inhibited
 by using the
@@ -276,14 +333,10 @@ No mail is actually sent.
 The
 .B \-file
 .I msgfile
-switch specifies the message to be forwarded as an 
+switch specifies the message to be forwarded as an
 exact filename rather than as an
 .B nmh
-folder and message number. It is 
-intended to be used by the
-.B msh
-interface to
-.BR nmh . 
+folder and message number.
 This switch implies
 .BR \-noannotate .
 The forwarded message is simply
@@ -314,69 +367,110 @@ Specifying these switches enables and/or overloads the following escapes:
 .RS 5
 .nf
 .ta \w'Component  'u +\w'Escape  'u +\w'Returns  'u
-.I Type        Escape  Returns Description
+.I "Type       Escape  Returns Description"
 component      digest  string  Argument to `\-digest'
 function       cur     integer Argument to `\-volume'
 function       msg     integer Argument to `\-issue'
 .fi
 .RE
 .PP
-Consult the
-.I "Advanced Features"
-section of the
-.B nmh
-User's Manual for more information on making digests.
-
 .SH FILES
-.fc ^ ~
-.nf
-.ta \w'%etcdir%/ExtraBigFileName  'u
-^%etcdir%/forwcomps~^The standard message skeleton
-^or <mh\-dir>/forwcomps~^Rather than the standard skeleton
-^%etcdir%/digestcomps~^The message skeleton if `\-digest' is given
-^or <mh\-dir>/digestcomps~^Rather than the standard skeleton
-^%etcdir%/mhl.forward~^The standard message filter
-^or <mh\-dir>/mhl.forward~^Rather than the standard filter
-^$HOME/\&.mh\(ruprofile~^The user profile
-^<mh\-dir>/draft~^The draft file
-.fi
-
+.B 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
+.I Mail
+directory as specified in their profile.  If not found there, the directory
+.RI \*(lq %nmhetcdir% \*(rq
+is checked.
+.PP
+.PD 0
+.TP 25
+%nmhetcdir%/forwcomps
+The standard message skeleton.
+.TP
+<mh\-dir>/forwcomps
+Rather than the standard skeleton.
+.TP
+%nmhetcdir%/digestcomps
+The message skeleton if
+.B \-digest
+is given.
+.TP
+<mh\-dir>/digestcomps
+Rather than the standard skeleton.
+.TP
+^%nmhetcdir%/mhl.forward
+The standard message filter.
+.TP
+<mh\-dir>/mhl.forward
+Rather than the standard filter.
+.TP
+^$HOME/.mh_profile
+The user's profile.
+.PD
 .SH "PROFILE COMPONENTS"
-.fc ^ ~
-.nf
-.ta 2.4i
-.ta \w'ExtraBigProfileName  'u
-^Path:~^To determine the user's nmh directory
-^Current\-Folder:~^To find the default current folder
-^Draft\-Folder:~^To find the default draft\-folder
-^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 \*(lqWhat now?\*(rq questions
-.fi
-
+.PD 0
+.TP 25
+Path:
+To determine the user's nmh directory.
+.TP
+Current\-Folder:
+To find the default current folder.
+.TP
+Draft\-Folder:
+To find the default draft\-folder.
+.TP
+Editor:
+To override the default editor.
+.TP
+Msg\-Protect:
+To set mode when creating a new message (draft).
+.TP
+fileproc:
+Program to refile the message.
+.TP
+mhlproc:
+Program to filter messages being forwarded.
+.TP
+whatnowproc:
+Program to ask the \*(lqWhat now?\*(rq questions.
+.PD
 .SH "SEE ALSO"
-mhbuild(1), comp(1), repl(1), send(1), whatnow(1), mh\-format(5),
-.I "Proposed Standard for Message Encapsulation"
-(RFC\-934)
-
+.IR comp (1),
+.IR mhbuild (1),
+.IR repl (1),
+.IR send (1),
+.IR whatnow (1),
+.IR mh\-format (5)
+.PP
+.I
+Proposed Standard for Message Encapsulation
+(RFC 934)
 .SH DEFAULTS
-.nf
-.RB ` +folder "' defaults to the current folder"
-.RB ` msgs "' defaults to cur"
-.RB ` \-noannotate '
-.RB ` \-nodraftfolder '
-.RB ` \-noformat '
-.RB ` \-inplace '
-.RB ` \-dashstuffing '
-.RB ` \-nomime '
-.fi
-
+.PD 0
+.TP 25
++folder
+The current folder.
+.TP
+msgs
+The current message.
+.TP
+\-noannotate
+.TP
+\-nodraftfolder
+.TP
+\-noformat
+.TP
+\-inplace
+.TP
+\-dashstuffing
+.TP
+\-nomime
+.PD
 .SH CONTEXT
 If a folder is given, it will become the current folder.
 The first message forwarded will become the current message.
-
 .SH BUGS
 If
 .I whatnowproc
@@ -409,7 +503,7 @@ instead of
 .BR send ,
 it's possible to confuse
 .B forw
-by re\-ordering the file (e.g. by using
+by re\-ordering the file (e.g.\& by using
 .RB \*(lq folder
 .BR \-pack \*(rq)
 before the message is successfully sent.