The forw command lets you send copies of one or more messages to other people. Here is an introduction to forw.
It's easy to get the most common formatting. If you use the -format switch, forw will process the message(s) you're forwarding with an mhl filter file. Your system should have a standard file called mhl.forward that:
% forw -formatIf you want to use this filtering on most of the messages you forward, you may want to add this entry to your MH profile:
forw: -formatBefore forw checks the MH library directory for an mhl.forward file, it looks in your MH Mail directory. If you don't like the system mhl.forward file, you can copy the system mhl.forward file into your directory and then edit it:
% cd Mail % cp /usr/local/lib/mh/mhl.forward . % vi mhl.forward(You'll need to change the /usr/local/lib/mh if your system's MH library directory is someplace else.)
forw gives you another choice: using a different filter file than mhl.forward. That can be handy if you forward different kinds of messages. You might have a second filter file that includes Resent: fields from the original message, a third filter file that reformats the message body for a friend who has a 40-character-wide display, and so on. The Section forw Filter Files explains how to make your own.
If you set -format or -filter as a default in your MH profile, you can override either one of those switches by using -noformat as you type the forw command line.
--------Enter initial textAfter you enter the initial text, forw will scroll the body of the forwarded message(s) across your screen. The "initial text" gives you a chance to type some extra text -- for instance, you could write a note to the people who you're forwarding this to.
But you may not like the way that works. If you want the note you write to go after the forwarded message(s), add the -noprepend switch to the prompter: entry in your MH profile. Unfortunately, though, that changes the way prompter works for all message-sending commands, not just forw. The Section Append Text with prompter.nopre has a solution.
- Add one cup water. Stir. - Cook for 25 minutes.will be forwarded this way:
- - Add one cup water. Stir. - - Cook for 25 minutes.That's special formatting called "bit stuffing" that helps the MH burst command split forwarded messages back into separate message files. (There's a detailed description in RFC 934; see the Reference List.) One problem with that format comes when messages are nested many levels deep: the lines starting with dashes can get so long that they may be truncated by some message transports. Or you may not like the extra stuff (- ) at the beginning of dashed lines. The forw -mime switch forwards messages without bit-stuffing. (On the other hand, forw -mime -rfc934mode uses a MIME format that simulates bit-stuffing.) Not everyone has MIME yet, though. So you also can use the almost undocumented -nodashmunging switch. (It's mentioned in "The RAND MH Message Handling System: Administrator's Guide, UCI Version.")
Of course, you should not use -nodashmunging if the person you send the message to will want to burst it. And because it isn't documented, don't depend on -nodashmunging staying in MH forever.
The -nodashmunging switch only works in combination with -format or -filter and a filter file:
% forw -nodash -formatIf you don't want any formatting, you can't use both -noformat and -nodashmunging to get it. The best answer for that is probably a filter file that does no formatting. Here's one that I call mhl.noformat; you can put it your MH directory:
width=10000 extras:nocomponent : body:nocomponentIf you want long body lines wrapped after the 79th character, add ,width=80 (with no space before it) to the end of the last line.
You use mhl.noformat by typing its name on the command line (which overrides any default mhl.forward), like this:
% forw -filter mhl.noformat -nodashmungingmhl.noformat doesn't delete any header fields, and it leaves long lines as they are in the original message. For more information, see the Section forw Filter Files.
You don't have to follow this rule when you're forwarding a message with the MIME #forw directive -- before you encode the message. After you encode it with edit mhn, though, you should be careful about the space between the parts. Also see the Section Forwarding in MIME Format.
forw: -form components
Forwarded: Mon, 09 Jan 1995 09:13:52 -0500 Forwarded: email@example.comThese let you know that you forwarded the message to al@phlabs and when you did it. There will be one Forwarded: user@host field for each address you forward the message to.
By default, scan looks for Replied: fields in messages, but it doesn't look for Forwarded: fields. If you want to, you can add that yourself, though; see the Section More Header Information: scan.hdr.
Here's an example. You're taking over as moderator of the octopus-eaters mailing list. Before the first issue, you store the recipients' addresses in an alias named dist-octopus-eaters. You ask your system postmaster to create a system alias named octopus-eaters-request with your name; this is where people send mail if they want to be added to or deleted from the mailing list. The first issue you're sending is volume 1, issue 26. To send messages 25-34:
% forw -digest octopus-eaters -volume 1 -issue 26 25-34 From: octopus-eaters-Request To: octopus-eaters Distribution: dist-octopus-eaters; Subject: octopus-eaters Digest V1 #26 Reply-To: octopus-eaters --------Enter initial text Hi. I'm Emma H. User, the new moderator of octopus-eaters. Send submissions to: firstname.lastname@example.org. CTRL-D octopus-eaters Digest Thursday, 25 Jul 1991 Volume 1 : Issue 26 Today's Topics: ...Messages appear... End of octopus-eaters Digest [Volume 1 Issue 26] ************************************************ -------- What now?The header setup can be stored in your MH directory in a replcomps-style file named, by default, digestcomps. You can customize digestcomps. If you run more than one digest, creating some versions of forw can save time.
For the next issue, just type forw -digest octopus-eaters. MH will automatically assign volume 1, issue 27, unless you override it.
Another way to create message digests is the forw -mime switch. It doesn't have the nice numbering and formatting features of forw -digest, though.
Another way to forward in MIME format is to use comp -- and put #forw directives in the draft. This lets you forward messages from more than one folder. It won't annotate the messages you forward, but you can use the anno command to add Forwarded: fields to the original messages.
One disadvantage of forw -mime (compared to plain forw) is that it overrides the -filter and -format switches. All header fields, including "useless" fields like Received:, are copied from the forwarded messages. (Actually, as with many MH switches, the order that forw reads the switches determines which switch will "win." The last switch in the group -mime, -filter and -format is the one that's used. forw reads the MH profile before reading its command line. So, if you have -filter in your MH profile and you run the command forw -mime, the -mime switch will override -filter. As another example, if you type forw -mime -format, the -format switch will win because it comes last on the command line.)
If you want to use MIME format but you also want to filter out useless header fields, see the trick in the Section Filter Forwarded MIME Messages: mforw. The mforw version shown there is actually a link to the repl command that edits a message and forwards it in MIME format. That mforw version only forwards one message at a time, though. To forward several messages with cleaned-up headers or to build a MIME digest, the easiest method I know is to use forw -mime; run edit mhn; then edit the message by hand (with a command like edit emacs).
[Table of Contents] [Index] [Previous: Replying to Mail with repl] [Next: Distributing Messages with dist]
This file is from the third edition of the book MH & xmh: Email for Users & Programmers, ISBN 1-56592-093-7, by Jerry Peek. Copyright © 1991, 1992, 1995 by O'Reilly & Associates, Inc. This file is freely-available; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation. For more information, see the file copying.htm.
Suggestions are welcome: Jerry Peek <email@example.com>