PMDF popstore & MessageStore Manager's Guide


Previous Contents Index

4.3.4.9 list_forward Command: list forwarding addresses

The list_forward command is used to list popstore forwardings. The parameter names and associated values accepted by the command are listed in Table 4-9.

Table 4-9 list_forward command parameters
parameter=value   Description
on_error=file-spec Required Name of the formatting file to use to format the results when the command fails.
on_success=file-spec Required Name of the formatting file to use to format the results when the command succeeds.
pformat=file-spec Required Name of the formatting file to use to format each forwarding address. The recognized substitution strings for this formatting file are listed in Tables 4-10 and 4-11.
rooted=bvalue Optional Boolean value, 0 or 1, indicating whether or not an exact lookup is performed. When bvalue is 0, only the entry, if any, exactly matching the username string is returned. When bvalue is 1, then the username string is treated as a prefix and any forwarding beginning with the supplied username string will be returned. When not specified, a bvalue of 0 is assumed.
username=string Optional Username for which to list the forwarding. If omitted, all forwardings are listed. Maximum length of string is 32 bytes. The string can not contain wild cards.

The username parameter can appear in the command at most once. If the username parameter is omitted and rooted=1 is specified, then all forwardings will be returned. Note that username lookups are done in a case-insensitive manner.

An example command to list all forwardings starting with the letter d is shown below:


command=list_forward&username=d&rooted=1&pformat=lfwd.txt& 
  on_success=lfwd_success.txt&on_error=lfwd_error.txt 
A sample formatting file is shown in Example 4-1. This is the formatting file used by the interactive, command line management utility.

Example 4-1 list_forward formatting file

%none{No forwardings exist} 
%first{Username                          Forwarding address} 
%first{----------------------------------------------------} 
%fwd_from{%-32s}  %fwd_to 

Table 4-10 General substitution strings
Substitution string Type Format Description
%last string %s Text string to display if this is the last formatting pass.
%none string %s Text string to display if there is no information to format.
%first string %s Text string to display if this is the first formatting pass.
%!first string %s Text string to display if this is not the first formatting pass.
%!last string %s Text string to display if this is not the last formatting pass.
%S string S Output an uppercase letter "S" if the previously displayed numeric value had a non-singular value. See the text for a description of how to output different strings depending upon whether or not the last numeric value was non-singular.
%s string s Output a lowercase letter "s" if the previously displayed numeric value had a non-singular value. See the text for a description of how to output different strings depending upon whether or not the last numeric value was non-singular.
%host string %s Display the TCP/IP domain name of the CGI server host on which the popstore information was collected.
%image_ident string %s PMDF version number as recorded in the PMDF shared library.
%image_link_date string %s Date and time the PMDF shared library was linked.
%time string %s Display the date and time at which the data was collected.

The formatting strings for the %s and %S substitution strings work differently from most substitution strings. The formatting strings specify the text to display when the previous numeric value was non-singular. If the formatting text contains a vertical bar, | , then the text to the left of the vertical bar is displayed when the previous numeric value is singular while the text to the right of the vertical bar is displayed when the previous numeric value is non-singular. For instance, the formatting instructions


Repl%s{y|ies} 
generate the output Reply when the previously displayed numeric value is singular and the Replies otherwise.

Table 4-11 list_forward command substitution strings
Substitution string Type Format Description
%fwd_from string %s Username being forwarded.
%fwd_to string %s Address to which the username is being forwarded.


Previous Next Contents Index