[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 Commands Reference, Volume 2

dist Command

Purpose

Redistributes a message to additional addresses.

Syntax

dist+Folder ] [ -nodraftfolder -draftfolder +Folder ] [ Message -draftmessage Message ] [ -annotate -inplace -noinplace ] | -noannotate ] [ -form FormFile ] [ -editor Editor -noedit ] [ -nowhatnowproc -whatnowproc Program ]

Description

The dist command provides an interface for redistributing existing messages to a new list of addresses. By default, the dist command copies the current message in the current folder to the UserMHDirectory/draft file and starts an editor. To specify a message in the current folder other than the default, use the Message parameter.

Once started, the editor prompts you to enter values for each header field. The dist command uses the header format defined in the UserMHDirectory/distcomps file. (If this file does not exist, the system uses the /etc/mh/distcomps file.) Since the body of the message is the message you are redistributing, do not fill in the body. To define a format file other than UserMHDirectory/distcomps file, use the -form flag.

To change the default editor, use the -editor flag or define the Editor: entry in your $HOME/.mh_profile file.

Press the Ctrl-D key sequence to exit the editor. Upon exiting the editor, the dist command starts the Message Handler (MH) What Now? prompt. Press the Enter key to see a list of the available whatnow subcommands. These subcommands enable you to continue editing the message header, list the message header, direct the disposition of the message, or end the processing of the dist command.

Note: A line of dashes or a blank line must be left between the header and the body of the message for the message to be identified when it is sent.

Redistributed messages consist of the original header and body appended to a new header. The draft file you edit using the dist command consists of header fields only. A copy of the original message with the new draft message is not automatically stored.

To annotate the original message with redistribution information, use the -annotate flag. This flag appends the original message with the Resent: field, and the current date and time.

Flags

-annotate Annotates the message being redistributed with the lines:
Resent: date
Resent: address

Since the -annotate flag is not preserved over multiple executions of the command, annotation is completed only if the message is sent directly from the dist command. The -inplace flag forces annotation to be done in place in order to preserve links to the annotated message.

-draftfolder +Folder Places the draft message in the specified folder. If -draftfolder +Folder flag is followed by a Message variable, it is the same as using the -draftmessage flag. If +Folder is not specified, the draft message is placed in Current-Folder.
-draftmessage Message Specifies a draft message. By default, the system creates a new draft message in the current folder. The draft message becomes the current message.
-editor Editor Specifies the initial editor for preparing the message for distribution.
+Folder Identifies the folder that contains the message to redistribute. If a folder is not specified, then Current-Folder is assumed.
-form FormFile Determines the message form. The dist command treats each line in the specified form file.
-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 in order to preserve links to the annotated message.
Message Identifies the message to redistribute. Use the following references to specify messages:
Number Number of the message.
cur or . (period) Current message. This is the default.
first First message in a folder.
last Last message in a folder.
next Message following the current message.
prev Message preceding the current message.
-noannotate Suppresses annotation. This flag is the default.
-nodraftfolder Places the draft in the UserMHDirectory/draft file.
-noedit Suppresses the initial edit.
-noinplace Prevents annotation in place. This flag is the default.
-nowhatnowproc Suppresses interactive processing of the dist command. The -nowhatnowproc flag prevents any edit from occurring.
-whatnowproc Program Starts the specified program to guide you through the distribution tasks. If you specify the whatnow command as the Program variable, the dist 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:

Current-Folder: Sets the default current folder.
Draft-Folder: Sets the default folder for drafts.
Editor: Sets the default editor.
fileproc: Specifies the program used to refile messages.
Path: Specifies the user's MH directory.
whatnowproc: Specifies the program used to prompt What now? questions.

Examples

  1. To redistribute the current message from the current folder, enter:
    dist
    The system prompts you for the header field values. After entering a value, press the Enter key. To skip an entry, press the Enter key without entering a value. You must fill in the Resent-to: field. After completing the headers, do not modify the body of the text. Press the Ctrl-D key sequence to exit the editor. The system prompts you with:
    What now? 
    Press the Enter key to see a list of available options. If you want to redistribute this message, enter send.  Your message is redistributed to the new list of addresses.
  2. To redistribute a message to a new list of addresses when a message draft exists, enter:
    dist
    The system responds with a message similar to the following:
    Draft "$HOME/Mail/draft" exists (43 bytes).
    Disposition? _
    To redistribute this draft, enter:
    replace
    The system prompts you for the header field values. After entering a value, press the Enter key. To skip an entry, press the Enter key without entering a value. You must fill in the Resent-to: field. After completing the headers, do not modify the body of the text. Press the Ctrl-D key sequence to exit the editor. The system prompts you with:
    What now?
    Press the Enter key to see a list of available options. If you want to redistribute the draft, enter send.  Your message is redistributed to the new list of addresses.
  3. To redistribute message 15 from the schedules folder, enter:
    dist +schedules 15
    The system prompts you for the header field values. After entering a value, press the Enter key. To skip an entry, press the Enter key without entering a value. You must fill in the Resent-to: field. After completing the headers, do not modify the body of the text. Press the Ctrl-D key sequence to exit the editor. The system prompts you with:
    What now?
    Press the Enter key to see a list of available options. To redistribute the message, type send and press the Enter key

Files

/etc/mh/distcomps Contains the system default message format.
UserMHDirectory/distcomps Contains the user's default message format.
UserMHDirectory/draft Contains the current draft file.
/usr/bin/dist Contains the executable form of the dist command.

Related Information

The ali command, anno command, comp command, forw command, prompter command, refile command, repl command, send command, whatnow command.

The mh_alias file, mh_profile file.

Mail Overview in AIX Version 4.3 System User's Guide: Communications and Networks.

Peek, Jerry. MH and xmh: E-mail for Users and Programmers. Sebastopol, CA: O'Reilly & Associates, 1992.


[ Previous | Next | Contents | Glossary | Home | Search ]