The forw and dist commands do similar things. But dist is designed for resending (distributing) messages without any changes or extra text in the body. This means that the people who receive a dist'ed message from you will see it as:
From: whoever-sent-it-to-you Date: whenever-original-was-sentinstead of:
From: you Date: whenever-you-forwarded-the-copyFor example, let's say that Norm sent a message to Mary on May 13. Then, on June 24, Mary sent two copies of the message to Mike as a test -- the first copy was with dist, and the second copy was with forw. Here's what Mike would see in his scan listing of the two copies of the same message:
1755+ 05/13 Norman Schwartzko Summary of the Zeta project<<This is 1756 06/24 Mary Shepley-Hunt Zeta info<<----- Forwarded MessagesYou can dist only one message at a time (forw lets you forward several messages as a unit). Here's an example:
% dist 23 Resent-To: bigboss Resent-cc: -------- CTRL-D -------- What now? sendIf you try to add extra text (besides the Resent- fields), send will ask you to "please re-edit draft to consist of headers only!" The distprompter shell script will prevent this error and make dist easier to use.
The people who receive the resent message will get the original message with these three fields added (or four, if you filled in Resent-cc:):
% inc ... % show ... Resent-To: bigboss Resent-Date: Mon, 09 Jan 1995 07:33:22 -0600 Resent-From: ehuser (Emma H. User) ...Otherwise, the recipients' copies of the message will be identical to yours.
NOTE: dist (actually, the send command) can't resend a message from a read-only folder (explained in the Section Sharing Other Users' Folders). When you try to send the message, it gives you an error like:send: unable to link xx/yy/zz/83 to /xx/yy/zz/send012817: Permission denied.One easy workaround is the rcvdist command. rcvdist is in your system's MH library directory. Put the addresses on the command line; redirect the standard input of rcvdist to the message file. Use mhpath in backquotes to get the message file pathname. For example, to resend the current message to firstname.lastname@example.org and email@example.com, type:% /path/rcvdist firstname.lastname@example.org email@example.com < `mhpath cur`The forw command also works from read-only folders.
You can add a few other fields to the header besides the default Resent-To: and Resent-cc: by editing the draft header or putting a distcomps template file in your MH directory.
If you use the -annotate switch on the dist command line or in your MH profile, the message you resend will have fields like this added to its header:
Resent: Mon, 09 Jan 1995 09:13:52 -0500 Resent: firstname.lastname@example.orgOtherwise, this works just like forw -annotate.
distprompter is an editor designed for dist. It's also an example of writing your own draft message editor.
By default, dist uses prompter to edit the draft. prompter isn't a great editor for dist, because if you accidentally type a message body after the row of dashes, the message can't be sent. Also, you always have to press CTRL-D to skip the body and get the What now? prompt.
Besides fixes for the two problems listed above, distprompter acts a lot like prompter:
dist: -editor distprompterAnother section explains how to set up distprompter.
This file is from the third edition of the book MH & xmh: Email for Users & Programmers, ISBN 1-56592-093-7, by Jerry Peek. It 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 COPYING.
Copyright © 1991, 1992, 1995 O'Reilly Media, Inc.
Last modified: 2006-05-31 15:13:43 -0700