HELPLIB.HLB  —  PMDF  DELIVER  MAIL.DELIVERY File format, Actions
    The ACTION and 1-PARAMETER items specify what action is taken
    when a directive is applied to a message. The first character
    of ACTION specifies what type of action to take. The legal
    characters for ACTION and what they do are:

 A

    Append the body (or contents) of the message to a file. The
    message header is not included. The 1-PARAMETER item specifies
    the file name. The file need not already exist: if necessary,
    it will be created. The recipient must have write access to the
    file, if it exists, and write access to its directory if it needs
    to be created; DELIVER grants the user no special file access
    privileges.

 B

    Same as D but with the message headers appearing at the bottom of
    any messages delivered to VMS MAIL. PMDF's FOLDER utility is used
    to deliver the mail.

 C

    Copy the body of the message to a file whose name is 1-PARAMETER
    . Write access to the directory where the file is to be created
    is required.

 D, V

    Deliver the message normally to VMS MAIL. 1-PARAMETER is the name
    of the folder the message is to be placed in. If 1-PARAMETER is
    omitted the message is placed in the VMS MAIL's NEWMAIL folder
    by default. Delivery to VMS MAIL's NEWMAIL is done directly by
    PMDF; delivery to other folders is done using the FOLDER utility.
    The V action is identical to the D action; it is retained for
    compatibility with earlier versions of DELIVER.

    If an additional parameter, 2-PARAMETER, is specified, then that
    additional parameter will be interpreted as the name of the mail
    file to use in the case of VMS MAIL delivery. The user's default
    mail file and default directory are used if 2-PARAMETER is not
    specified.

    The following example shows an action that delivers to the
    NEWMAIL folder in an alternate mail file:

    * "*+gripes*" * T D NEWMAIL GRIPES.MAI

 E

    Execute the specified command. The DCL command specified by 1-
    PARAMETER is executed. The command is executed in the environment
    of the recipient's own account. Any noninteractive DCL command is
    valid, including an indirect command file specification. The DCL
    symbols shown in the table below can be used in the command to
    facilitate message processing.

    Table 1 DCL Symbols Available to DELIVER Command Files

    Symbol           Equivalence value

    FROM             The message's From: address (selected
                     as described under the topic Directive
                     Applicability)
    TO               The message's To: address
    SUBJECT          The message's Subject:
    CC               The message's cc:
    QFROM            From: with quotes doubled (selected as described
                     under the topic Directive Applicability)
    QQFROM           From: with quotes quadrupled (selected
                     as described under the topic Directive
                     Applicability)
    QTO              To: with quotes doubled
    QQTO             To: with quotes quadrupled
    QSUBJECT         Subject: with quotes doubled
    QQSUBJECT        Subject: with quotes quadrupled
    QCC              Cc: with quotes doubled
    QQCC             Cc: with quotes quadrupled
    C1, C2, C3       See S action
    QC1, QC2, QC3    See S action
    QQC1, QQC2,      See S action
    QQC3
    MESSAGE_FILE     The name of the file containing the body of the
                     message; MESSAGE_FILE always contains a full
                     file path
    MESSAGE_HEADER   The name of the file containing the headers of
                     the message; MESSAGE_HEADER always contains a
                     full file path
    MESSAGE_DELETE   Initially set to "YES", if this symbol is set to
                     "NO", no attempt will be made to delete MESSAGE_
                     FILE and MESSAGE_HEADER after all actions are
                     complete; the M action sets MESSAGE_DELETE to
                     "NO"

    The Q forms are useful if the symbol must be expanded inside a
    quoted string. The MESSAGE_DELETE flag is useful if MESSAGE_
    FILE or MESSAGE_HEADER (or both) have to be queued for further
    processing at a later time, or if one of the actions has already
    deleted them.

 F, W

    Forward the message. The message is forwarded to the address
    specified by 1-PARAMETER.

    VMS MAIL is used to send the message. As such, the address
    specified by 1-PARAMETER must be one that VMS MAIL will accept;
    PMDF addresses will probably require the use of an IN% construct,
    for instance. A new message header is added; the original header
    is lost. The new header refers to the forwarding user as the
    message originator.

 H

    Append the header and the body (or contents) of the message to
    a file. One blank line is written between the header and the
    body. The 1-PARAMETER item specifies the file name. The file
    need not already exist: if necessary, it will be created. The
    recipient must have write access to the file, if it exists, and
    write access to its directory if it needs to be created; DELIVER
    grants the user no special file access privileges.

 J

    Set the batch queue or a queue parameter used to run the command
    file produced by DELIVER. DELIVER uses the queue DELIVER_BATCH
    by default; if this queue is not defined or is inaccessible by
    the message recipient (the owner of the MAIL.DELIVERY file) the
    queue SYS$BATCH will be used instead. The J action provides a way
    to specify an alternate queue and/or a job parameter. If a single
    1-PARAMETER is specified it is the name of the queue. If both 1-
    PARAMETER and 2-PARAMETER are specified the former gives the name
    of the job parameter to set and the latter gives the value to set
    the parameter to. Currently the only parameters supported are P1
    through P8, which set the corresponding positional job parameter
    to the string specified in 2-PARAMETER.

    If the queue specified with the J action cannot be used, the
    DELIVER_BATCH queue or SYS$BATCH queue will be used instead.

 K

    Save the command file after execution. Normally the command
    file created on behalf of the user is deleted automatically
    after execution. This action, if used, inhibits this automatic
    deletion.

 L

    Save the batch log of the DCL commands executed by DELIVER
    for each message processed in the file 1-PARAMETER in the
    user's login directory. This option is useful for debugging
    MAIL.DELIVERY files and command scripts. If more than one L
    action is triggered only the last one has any effect.

 M

    Save the message and header files after execution of the batch
    job. The message and header files are normally deleted as the
    last step of processing by the batch job. This action suppresses
    automatic deletion of these files; the same effect can be
    obtained by setting the MESSAGE_DELETE flag to NO.

 O

    Same as D but with the message headers omitted from messages
    delivered to VMS MAIL. PMDF's FOLDER utility is used to deliver
    the mail.

 P

    Forward the message. The message is forwarded to the address
    specified by 1-PARAMETER.

    PMDF is used to send the message. As such, the address specified
    by 1-PARAMETER should be a standard RFC 822 style address.
    The original message header is retained and supplemented with
    additional information describing the forwarder as the sender of
    the message.

 Q

    Quit; take no action and abort. If this action is taken
    DELIVER stops scanning the MAIL.DELIVERY file at this point.
    No subsequent directives will apply after this one. Use this
    directive with care; it is very easy to lose messages when this
    action is employed.

 R

    Reset specified flag or flags. This action examines its first
    argument one character at a time and clears any associated flag.
    Two flags are defined at present. The R flag is set whenever
    DELIVER finds an applicable directive. This flag is tested by
    the B, O, Q, S, and ? ACCEPT items. The A flag is set whenever
    DELIVER applies some directive that is thought of as having
    processed the message.

 S

    Save the current column strings for pattern matching of columns
    one, two, and three in special DCL column variables C1, C2,
    and C3, respectively. The DCL variables QC1, QC2, QC3 (quotes
    doubled), QQC1, QQC2, and QQC3 (quotes quadrupled), are also
    defined in the same way as the variables FROM, QFROM, and QQFROM
    are defined.

    This action makes it possible to save and act upon the results
    produced by the 1, 2, and 3 actions in ways that cannot be
    accommodated by the facilities DELIVER provides directly.

 One, Two, Three (1, 2, 3)

    Rebuild the strings the DELIVER patterns are matched against. 1
    rebuilds the string 1-PATTERN is compared with, 2 rebuilds the
    string 2-PATTERN is compared with, and 3 rebuilds the string 3-
    PATTERN is compared with. 1-PARAMETER is either the keyword RESET
    or an expression that describes the processing to be applied to
    the message header to produce the resultant column string. The
    expression is written in what amounts to a miniature language
    specialized for just this purpose.

    The expression language is very simple; it consists of tokens
    that describe either atoms (in the spirit of RFC 822) or
    operators. There are only two types of atoms and four operators.

    The simplest form of atom is simply the field-name of a message
    header. Any possible message header field-name can be specified,
    including standardized ones like MESSAGE-ID, RESENT-FROM, and
    REFERENCES and nonstandard ones like X-VMS-CC, ORGANIZATION,
    and FRUIT-OF-THE-DAY. Any field-name can be specified, including
    field-names that PMDF does not recognize or use itself.

    Two special field-names with special meanings are provided.
    ENVELOPE-FROM refers to the envelope FROM: address (which
    usually, but not always, appears on the RETURN-PATH: header)
    and ENVELOPE-TO refers to the ENVELOPE TO: address that describes
    the current message recipient. The latter envelope information
    usually appears on one of the various recipient headers (TO:,
    RESENT-TO:, BCC:, etc.), but can be hard to locate in some cases
    or completely missing in other cases.

    The presence of such an atom amounts to a request to extract the
    text from the header (or possibly headers) that correspond to
    the specified field-name and use this text as the column string
    result. If the specified field-name is not used in the message
    header the atom extracts an empty or null string.

    The other sort of atom is simply a quoted string. Single quotes
    are used instead of double quotes since double quotes usually
    surround the entire 1-PARAMETER. The contents of the quoted
    string are used as the column string. This atom is not useful
    by itself; it is designed to be used in conjunction with other
    atoms and operators.

    The most straightforward operator is concatenation. Two or more
    atoms appearing side by side (with only spaces and/or tabs in
    between) are concatenated to form a composite result.

    A comma acts as a special form of concatenation. The expressions
    on either side are evaluated and concatenated. If the expressions
    on both sides of the comma produce non-null results, then a
    comma-space sequence is inserted between them. The comma-space
    is not inserted if either side produces only an empty string as a
    result.

    A forward slash, /, acts as a form of alternation. It will
    "return" the result of the evaluation of the left hand side if
    it is not empty, and the result of the right hand side if the
    left hand side result is null. (The similarity of these operators
    to those used in RFC 822 is not coincidental.)

    An asterisk, *, is used as a special modifier to any expression.
    When it precedes an expression, it requests that the evaluation
    of any field-name atom return all header lines with the specified
    field-name concatenated together, rather than simply the first
    such line. A quoted string atom can be specified directly after
    the asterisk, and if such a string is specified it is inserted
    between any concatenated header lines.

    Finally, the various operators bind differently. Asterisk binds
    the tightest (similar to exponentiation in regular mathematical
    expressions), followed by concatenation, and finally alternation.
    Parentheses can be used to alter the binding order as needed.

    Here are a few examples of 1-PARAMETER expressions:

 *  *  *  A 1 "MESSAGE-ID, RESENT-MESSAGE-ID, ALTERNATE-MESSAGE-ID"

    The MESSAGE-ID:, RESENT-MESSAGE-ID:, and the (nonstandard)
    ALTERNATE-MESSAGE-ID: headers are concatenated with commas
    inserted between them.

 *  *  *  A 1 "(RESENT-TO,RESENT-CC,RESENT-BCC)/(TO,CC,BCC)/ENVELOPE-TO"

    The various Resent- recipient headers are concatenated, and if
    none of them exist the regular set of recipient headers are used
    instead. If these in turn don't exist the envelope TO: address is
    used (presumably as a last resort).

 *  *  *  A 1 "* ' ' RECEIVED"

    All of the Received: headers are concatenated into a single
    string separated by spaces.

    Considerably more complex expressions can be built as the need
    arises.

    The keyword RESET restores the original value of the
    corresponding column. This would be used after another 1, 2,
    or 3 directive has modified the string. It is used for example as
    follows:

 *  *  *  A 1 RESET
Close Help