Sun Java System Messaging Server 6.3 Administration Reference

Options

The options for this command are:

Option  

Description  

address

Specifies the test address to be rewritten. If this option is omitted, then the command prompts for an address. Used with the -rewrite option.

input_string

The string to be matched in the left side of a mapping table. Used with the -mapping option.

ldap_url 

The LDAP URL that imsimta test -url attempts to resolve.

-alias_file=filename

Specifies an alternate alias file for imsimta test -rewrite to use. imsimta test -rewrite normally consults the default alias file named by the IMTA_ALIAS_FILE option of the MTA tailor file, msg-svr-base/config/imta_tailor, during the rewriting process. This option has no effect unless -noimage_file is specified or no compiled configuration exists; any compiled configuration precludes reading any sort of alias file.

-block

Treats the entire input as a single sieve script. The default is to treat each line as a separate script. 

-channel | -nochannel

Controls whether imsimta test -rewrite outputs detailed information regarding the channel an address matches (e.g., channel flags).

-check_expansions | -nocheck_expansions

Controls checking of alias address expansion. Normally the MTA considers the expansion of an alias to have been successful if any of the addresses to which the alias expands are legal. The -check_expansions option causes a much stricter policy to be applied: imsimta test -rewrite -check_expansions checks each expanded address in detail and reports a list of any addresses, expanded or otherwise, that fail to rewrite properly.

-configuration_file=file

Specifies an alternate file to use in place of the file named by IMTA_CONFIG_FILE. Normally, imsimta test -rewrite consults the default configuration file named by the IMTA_CONFIG_FILE option of the MTA tailor file, msg-svr-base/config/imta_tailor, during the rewriting process. This option has no effect unless -noimage_file is specified or no compiled configuration exists; use of any compiled configuration precludes reading any sort of configuration file.

-database=database-list

Disables references to various databases or redirects the database paths to nonstandard locations. imsimta test -rewrite normally consults the usual MTA databases during its operation. The allowed list items are alias, noalias, domain, nodomain, 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.

-debug | -nodebug

Enables the production of the additional, detailed explanations of the rewriting process. This option is disabled by default. 

-delivery_receipt | -nodelivery_receipt

Sets the corresponding receipt request flags. These options can be useful when testing the handling of sent or received receipt requests when rewriting forwarded addresses or mailing lists. 

-destination_channel=channel

Controls to which destination or target channel imsimta test -rewrite rewrites addresses. Some address rewriting is destination channel specific; imsimta test -rewrite normally pretends that its channel destination is the local channel l.

-exp

imsimta test -exp tests Sieve language statements against a specified RFC2822 message and sends the results of the filter to standard output.

The syntax is as follows: 

imsimta test -exp -mm -block -input=Sieve_language_scriptfile -message=rfc2822_message_file

where, 

-block treats the entire input as a single Sieve script. The default is to treat each line as a separate script and to evaluate it separately. The Sieve will only be evaluated once the end of file is reached. 

-input=Sieve_file is a file containing the Sieve script. The default is to read the test script lines or script block from stdin. 

-message=message_file is a text file containing the RFC 2822 message you want to test your Sieve script against. This has to be an RFC 2822 message only. It cannot be a queue file (not a zz*.00 file). 

Once activated, this command reads script information, evaluates it in the context of the test message, and writes out the result. The result shows what actions would be taken as well as the result of evaluating the final statement in the script. 

Additional useful qualifiers are: 

-from=address specifies the envelope from address to be used in envelope tests. The default is to use the value specified by the RETURN_ADDRESS MTA option. 

-output=file writes results to file. The default is to write the results of script evaluation to stdout. 

-filter | -nofilter

Outputs any filters that are applied for the specified address. 

-from=address | -nofrom

Controls what envelope From: address is used for access control probes when the -from option is specified. If address is omitted, the postmaster return address is used for such probes. If the -nofrom option is specified, the MTA uses an empty envelope From: address for access probes.

-flags=chars | -noflags

Specifies particular flags to be set during the mapping test when the -flags option is specified. For example, chars can be E (envelope), B (header/body), or I (message id) when testing a REVERSE mapping. Used with the -mapping option only.

-image_file=[filename] | -noimage_file

The -noimage_file option instructs the command to unconditionally ignore any previously compiled configuration and to read configuration information from the various text files instead. When the -image_file option is specified without an optional file name, the compiled configuration is loaded from the file named by the IMTA_CONFIG_DATA option into the MTA tailor file, msg-svr-base/config/imta_tailor, which is usually msg-svr-base/config/imta.cnf. If, instead, a file name is specified, then the compiled configuration is loaded from the specified file.

-input=input-file

Specifies a source for input. By default, imsimta test takes input from stdin.

-local_alias=value | -nolocal_alias

Controls the setting of an alias for the local host. The MTA supports multiple “identities” for the local host; the local host may have a different identity on each channel. This option may be used to set the local host alias to the specified value; appearances of the local host in rewritten addresses are replaced by this value. 

-mapping_file=file | -nomapping_file

Instructs the command to use the specified mapping file rather than the default mapping file named by the IMTA_MAPPING_FILE option in the MTA tailor file, msg-svr-base/config/imta_tailor, which is usually the file named msg-svr-base/config/mappings. This option has no effect unless -noimage_file is specified or no compiled configuration exists; use of any compiled configuration precludes reading the mappings file. Use of the -nomapping_file option will prevent the IMTA_MAPPING_FILE file from being read in when there is no compiled configuration.

-message=message-file

Specifies the text file containing the message that is tested. The message-file must be an RFC 822 message only; it cannot be a queue file.

-mm

Tells imsimta test -exp to load the sieve-specific extensions to the expression interpreter. This includes all the sieve tests and actions such as header, address, envelope, discard, fileinto, and keep. Without -mm you cannot test sieves. The command to test sieves against a message is:

imsimta test -expression -mm -message=message

-noreprocess

Turns off the internal reprocessing flag that would otherwise be set. This option is useful for simulating the behavior of other components that operate without the reprocessing flag being set. This can be thought of as controlling whether or not rewrite_test acts as if it were the reprocessing channel. The biggest effect is that it turns off deferred list processing. Normally it should be done so this switch defaults on; use -noreprocessing to disable expansion.

-option_file=filename | -nooption_file

Instructs the command to use the specified option file rather than the default option file named by the IMTA_OPTION_FILE option in the MTA tailor file, msg-svr-base/config/imta_tailor, which is usually the file msg-svr-base/config/options.dat. This option has no effect unless -noimage_file is specified or no compiled configuration exists; use of any compiled configuration precludes reading any sort of option file. Use of the -nooption_file option prevents the IMTA_OPTION_FILE file from being read in when there is no compiled configuration.

-output=output-file

Directs the output of imsimta test. By default, imsimta test writes output to stdout. This option only works if the mailsrv account has write access to the current working directory.

-read_receipt | -noread_receipt

Sets the corresponding receipt request flags. This option can be useful when testing the handling of receipt requests at the time of rewriting forwarded addresses or mailing lists. 

-restricted=setting

Controls the setting of the restricted flag. By default, this flag has value 0. When set to 1, -restricted=1, the restricted flag is set on and addresses are rewritten using the restricted mailbox encoding format recommended by RFC 1137. This flag is used to force rewriting of address mailbox names in accordance with the RFC 1137 specifications.

-sender=from_address

A value used to set the “authenticated sender” (final field) of FROM_ACCESS mapping table probes. That is, one received as a result of SASL authentication. This allows test -rewrite to be used to test these mappings.

-source_channel=channel

Controls which source channel is performing the rewriting. Some address rewriting is source channel-specific; imsimta test -rewrite normally assumes that the channel source for which it is rewriting is the local channel l.

-table=table-name

Specifies the name of the mapping table to test. If this option is not specified, then imsimta test -mapping prompts for the name of the table to use.