Test address rewriting specified by a PMDF configuration
Syntax
PMDF TEST/REWRITE [test-address[,...]]
Command Qualifiers Defaults
/ALIAS_FILE=file-spec /ALIAS_FILE=PMDF_ALIAS_FILE
/CHANNEL /CHANNEL
/CHECK_EXPANSIONS /NOCHECK_EXPANSIONS
/CONFIGURATION_FILE=file-spec /CONFIGURATION_FILE=PMDF_CONFIG_FILE
/DATABASE=database-list See text
/DEBUG /NODEBUG
/DELIVERY_RECEIPT See text
/DESTINATION_CHANNEL=channel None
/FILTER /NOFILTER
/FROM=address /FROM=postmaster@localhost
/GREY=setting /GREY=0
/IMAGE_FILE=file-spec /IMAGE_FILE=PMDF_CONFIG_DATA
/LOCAL_ALIAS=value None
/MAPPING_FILE=file-spec /MAPPING_FILE=PMDF_MAPPING_FILE
/OPTION_FILE=file-spec /OPTION_FILE=PMDF_OPTION_FILE
/READ_RECEIPT See text
/REPROCESSING /REPROCESSING
/RESTRICTED=setting /RESTRICTED=0
/SOURCE_CHANNEL=channel /SOURCE_CHANNEL=L
1 – Restrictions
None.
2 – Prompts
Address: test-address[,...]
3 – Parameters
test-address
Optional parameter specifying one or more addresses to rewrite.
4 – Description
TEST/REWRITE provides a straightforward test facility for
examining PMDF's address rewriting and channel mapping process
without actually sending any message. Various qualifiers can be
used to control whether TEST/REWRITE uses the configuration text
files or the compiled configuration (if present), the amount of
output produced, and so on.
If one or more test addresses are specified on the command
line, TEST/REWRITE applies PMDF address rewriting to those
addresses, reports the results, and exits. If no test address
is specified TEST/REWRITE will enter a loop, prompting for
addresses, rewriting them, and prompting again for more
addresses. TEST/REWRITE will exit when a CTRL/Z is entered.
When testing rewriting of a alias corresponding to a mailing list
which has an AUTH_ or CANT_ type of named parameter controlling
who is authorized to post to the list, or when testing rewriting
when SEND_ACCESS or related mapping tables are in effect, note
that by default TEST/REWRITE uses as the posting address the
return address of the local postmaster as specified by the
RETURN_ADDRESS option in the PMDF option file. To specify a
different posting address for the rewriting process, use the
/FROM qualifier.
5 – Command Qualifiers
5.1 /ALIAS_FILE
/ALIAS_FILE=filename
TEST/REWRITE normally consults the default alias file PMDF_ALIAS_
FILE during the rewriting process. The /ALIAS_FILE qualifier
specified an alternate file for TEST/REWRITE to use.
This qualifier has no effect unless /NOIMAGE_FILE is specified
or no compiled configuration exists; use of any compiled
configuration precludes reading any sort of alias file.
5.2 /CHANNEL
/CHANNEL (default)
/NOCHANNEL
This qualifier controls whether the utility outputs detailed
information, e.g., channel flags, regarding the channel an
address matches.
5.3 /CHECK_EXPANSIONS
/CHECK_EXPANSIONS
/NOCHECK_EXPANSIONS (default)
This qualifier controls checking of alias address expansion.
Normally PMDF considers the expansion of an alias to have been
successful if any of the addresses the alias expands to are
legal. The /CHECK_EXPANSIONS qualifier causes a much stricter
policy to be applied; TEST/REWRITE checks each expanded address
in detail and reports a list of any addresses, expanded or
otherwise, that fail to rewrite properly. For addresses that
match the L channel, PMDF also performs validity checks.
5.4 /CONFIGURATION_FILE
/CONFIGURATION_FILE=filename
TEST/REWRITE normally consults the default configuration
file PMDF_CONFIG_FILE during the rewriting process. The
/CONFIGURATION_FILE qualifier specifies an alternate file to
use in place of the file PMDF_CONFIG_FILE.
This qualifier has no effect unless /NOIMAGE_FILE is specified
or no compiled configuration exists; use of any compiled
configuration will preclude reading any sort of configuration
file.
5.5 /DEBUG
/DEBUG
/NODEBUG (default)
The address rewriting process is capable of producing additional,
detailed explanations of what actions are taken and why. The
/DEBUG qualifier enables this output; it is disabled by default.
5.6 /DATABASE
/DATABASE=database-list
TEST/REWRITE normally consults the usual PMDF databases
during its operation. This qualifier is used to either disable
references to various databases or to redirect the database paths
to nonstandard locations.
The allowed list items are ALIAS, NOALIAS, PERSONAL_ALIAS,
NOPERSONAL_ALIAS, DOMAIN, NODOMAIN, FORWARD, NOFORWARD, GENERAL,
NOGENERAL, REVERSE, and NOREVERSE. The list items beginning with
"NO" disable use of the corresponding database. The remaining
items require an associated value, which is taken to be the name
of that database.
5.7 /DELIVERY_RECEIPT
/DELIVERY_RECEIPT
/NODELIVERY_RECEIPT
The /DELIVERY_RECEIPT and /NODELIVERY_RECEIPT qualifiers, which
explicitly set the corresponding receipt request flags, can
be useful when testing the handling of receipt requests when
rewriting forwarded addresses or mailing lists.
5.8 /DESTINATION_CHANNEL
/DESTINATION_CHANNEL=channel
The /DESTINATION_CHANNEL qualifier controls what destination or
target channel TEST/REWRITE rewrites addresses for. Some address
rewriting is destination channel specific; this qualifier allows
control of the assumed destination channel.
5.9 /FILTER
/FILTER
/NOFILTER (default)
The /FILTER qualifier may be used to have PMDF TEST/REWRITE
output any filters (personal mailbox, channel, or system)
applying for the address in question.
5.10 /FROM
/FROM=address
/NOFROM
This qualifier controls what envelope From: address is used for
access control probes and mailing list access probes. If the
/FROM qualifier is omitted, then the address used for access
checks is the postmaster return address. Specifying either
/FROM=<> or /NOFROM tells the utility to use an empty envelope
From: address for access checks.
5.11 /GREY
/GREY=setting
/NOGREY (default)
This qualifier controls the setting of the Grey Book flag. By
default, this flag has value 0. When set to 1, /GREY=1, the Grey
Book flag will be set on and addresses will be rewritten using
the Grey Book format.
This flag is used to force rewriting of address in accordance
with the JANET (Grey Book) specifications. The most significant
effect is that domain specifications appear in reverse order,
e.g., edu.claremont.ymir and not ymir.claremont.edu. See the PMDF
System Manager's Guide for further details.
Grey Book address formats are not currently used in PMDF, so this
qualifier's usefulness is problematic at best.
5.12 /IMAGE_FILE
/IMAGE_FILE[=filename]
/NOIMAGE_FILE
The /IMAGE_FILE qualifier serves two purposes. The first is
when /NOIMAGE_FILE is specified; this instructs TEST/REWRITE
to ignore any compiled configuration unconditionally and to read
configuration information from the various text files instead.
When the /IMAGE_FILE qualifier is specified without an optional
file name, PMDF TEST/REWRITE will load the compiled configuration
from the file PMDF_CONFIG_DATA. If, instead, a file name is
specified then TEST/REWRITE will load the compiled configuration
from the specified file.
5.13 /LOCAL_ALIAS
/LOCAL_ALIAS=value
/NOLOCAL_ALIAS (default)
This qualifier controls the setting of an alias for the local
host. PMDF supports multiple "identities" for the local host;
the local host may have a different identity on each channel.
This qualifier may be used to set the local host alias to the
specified value; appearances of the local host in rewritten
addresses will be replaced by this value.
5.14 /MAPPING_FILE
/MAPPING_FILE[=filename]
/NOMAPPING_FILE
This qualifier instructs TEST/REWRITE to use the specified
mapping file rather than the default mapping file named by the
PMDF_MAPPING_FILE logical name, usually PMDF_TABLE:MAPPINGS.
This qualifier has no effect unless /NOIMAGE_FILE was specified
or no compiled configuration exists; use of any compiled
configuration will preclude reading the mapping file.
Use of the /NOMAPPING_FILE qualifier will prevent the PMDF_
MAPPING_FILE file from being read in when there is no compiled
configuration.
5.15 /OPTION_FILE
/OPTION_FILE=filename
/NOOPTION_FILE
This qualifier instructs TEST/REWRITE to use the specified option
file rather than the default option file PMDF_OPTION_FILE.
This qualifier has no effect unless /NOIMAGE_FILE is specified
or no compiled configuration exists; use of any compiled
configuration will preclude reading any sort of option file.
Use of the qualifier /NOOPTION_FILE will prevent the file
PMDF_OPTION_FILE from being read in when there is no compiled
configuration.
5.16 /READ_RECEIPT
/READ_RECEIPT
/NOREAD_RECEIPT
The /READ_RECEIPT and /NOREAD_RECEIPT qualifiers, which
explicitly set the corresponding receipt request flags, can
be useful when testing the handling of receipt requests when
rewriting forwarded addresses or mailing lists.
5.17 /REPROCESSING
/REPROCESSING (default)
/NOREPROCESSING
This qualifier allows the utility to display the contents of a
mailing list which uses the [REPROCESS] named parameter in its
alias definition.
5.18 /RESTRICTED
/RESTRICTED=value
/NORESTRICTED
This qualifier controls the setting of the restricted flag. By
default, this flag has value 0. When set to 1, /RESTRICTED=1, the
restricted flag will be set on and addresses will be rewritten
using the restricted mailbox encoding format recommend by
RFC1137.
This flag is used to force rewriting of address mailbox names in
accordance with the RFC1137 specifications; see the PMDF System
Manager's Guide for further details.
5.19 /SOURCE_CHANNEL
/SOURCE_CHANNEL=channel
The /SOURCE_CHANNEL qualifier controls what source channel to
rewrite addresses for. Some address rewriting is source channel
specific; TEST/REWRITE normally pretends that the channel source
it is rewriting for is the local channel, L.
6 – Examples
This example shows the typical output generated by
TEST/REWRITE. Perhaps the single most important piece of
information generated by TEST/REWRITE is the last few lines
of the TEST/REWRITE output, 6, which give the channel to
which TEST/REWRITE would submit a message with the specified
test address and the form in which the test address would be
rewritten for that channel. This output is invaluable when
debugging configuration problems.
$ PMDF TEST/REWRITE DAN@EXAMPLE.COM
forward channel = tcp_local
channel description =
channel user filter =
dest channel filter =
source channel filter =
channel flags #0 = BIDIRECTIONAL SINGLE_SYSTEM IMMNORMAL NOSERVICEALL
channel flags #1 = SMTP RANDOMMX MAYTLS DEFAULT
channel flags #2 = NOLOCALPOST POSTHEADBODY HEADERINC NOEXPROUTE
channel flags #3 = LOGGING NOGREY NORESTRICTED
channel flags #4 = EIGHTNEGOTIATE NOHEADERTRIM NOHEADERREAD RULES
channel flags #5 = MASTER_DEBUG
channel flags #6 = LOCALUSER REPORTHEADER
channel flags #7 = SWITCHCHANNEL NOREMOTEHOST DATEFOUR DAYOFWEEK
channel flags #8 = NODEFRAGMENT EXQUOTA REVERSE NOCONVERT_OCTET_STREAM
channel flags #9 = NOTHURMAN INTERPRETENCODING INCLUDEFINAL RECEIVEDFROM
linelength = 998
addrsperfile = 127
channel env addr type = SOURCEROUTE
channel hdr addr type = SOURCEROUTE
channel official host = TCP-DAEMON
channel local alias =
channel queue name = MAIL_TCP_BATCH
channel after param = 60
channel daemon name = fw.example.com
channel user name =
urgentnotices = 1 4 8 12
normalnotices = 1 4 8 12
nonurgentnotices = 1 4 8 12
channel rightslist ids =
backward channel = tcp_local
header To: address = DAN@EXAMPLE.COM
header From: address = DAN@EXAMPLE.COM
envelope To: address = DAN@EXAMPLE.COM (route (TCP-DAEMON,TCP-DAEMON))
envelope From: address = DAN@EXAMPLE.COM
name =
mbox = DAN
Extracted address action list:
DAN@EXAMPLE.COM
Extracted 733 address action list:
DAN@EXAMPLE.COM
Address list expansion: