The imsimta test utilities perform tests on various areas of functionality of the MTA.
imsimta test -mapping tests the behavior of a mapping table in the mapping file. The result of mapping an input string will be output along with information about any meta characters specified in the output string.
If an input string is supplied on the command line, then only the result of mapping that input string will be output. If no input string is specified, imsimta test -mapping will enter a loop, prompting for an input string, mapping that string, and prompting again for another input string. imsimta test -mapping will exit when a CTRL-D is entered.
imsimta test -match tests a mapping pattern in order to test wildcard and global matching.
imsimta test -match prompts for a pattern and then for a target string to compare against the pattern. The output indicates whether or not the target string matched. If a match was made, the characters in the target string that matched each wildcard of the pattern is displayed. The imsimta test -match utility loops, prompting for input until the utility is exited with a CTRL-D.
imsimta test -rewrite provides a test facility for examining the MTA's address rewriting and channel mapping process without actually sending a message. Various qualifiers can be used to control whether imsimta test -rewrite uses the configuration text files or the compiled configuration (if present), the amount of output produced, and so on.
If a test address is specified on the command line, imsimta test -rewrite applies the MTA address rewriting to that address, reports the results, and exits. If no test address is specified, imsimta test -rewrite enters a loop, prompting for an address, rewriting it, and prompting again for another address. imsimta test -rewrite exits when CTRL-D is entered.
When testing an email address corresponding to a restricted distribution list, imsimta test -rewrite uses as the posting address the return address of the local postmaster, which is usually postmaster@localhost unless specified by the MTA option RETURN_ADDRESS in the MTA Option file.
imsimta test -url tests an LDAP queury URL. Note that the LDAP server to query is controlled by the setting of the MTA option LDAP_SERVER in local.conf.
imsimta test -rewrite [-alias_file=filename] [-channel | -nochannel [-check_expansions | -nocheck_expansions] [-configuration_file=filename ] [-database=database_list] [-debug | -nodebug] [-delivery_receipt | -nodelivery_receipt] [-destination_channel=channel] [-filter | -nofilter] [-from=address | -nofrom] [-image_file=filename | -noimage_file] [-input=input-file] [-local_alias=value | -nolocal_alias] [-mapping_file=file | -nomapping_file] [-option_file=filename | -nooption_file] [-output=output-file] [-read_receipt | -noread_receipt] [-restricted=setting] [-sender=from_address] [-source_channel=channel] [-noreprocess] |
imsimta test -mapping [input_string] [-debug | -nodebug] [-flags=chars | -noflags] [-image_file=filename | -noimage_file] [-mapping_file=filename] [-option_file=filename | -nooption_file] [-table=table-name] [address] |
imsimta test -match |
imsimta test -url [-debug | -nodebug] [ldap_url] |
imsimta test -message=message-file -exp -mm [-block] [-input=input-file] [-output=output-file] |
The options for this command are:
This example shows typical output generated by imsimta test -rewrite. The most important piece of information generated by imsimta test -rewrite is displayed on the last few lines of the output, which shows the channel to which imsimta 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.
imsimta test -rewrite Address: joe.blue channel = l channel description = channel description = channel flags #1 = BIDIRECTIONAL MULTIPLE IMMNONURGENT NOSERVICEALL channel flags #2 = NOSMTP POSTHEADBODY HEADERINC NOEXPROUTE channel flags #3 = LOGGING NOGREY NORESTRICTED channel flags #4 = EIGHTNEGOTIATE NOHEADERTRIM NOHEADERREAD RULES channel flags #5 = channel flags #6 = LOCALUSER NOX_ENV_TO RECEIPTHEADER channel flags #7 = ALLOWSWITCHCHANNEL NOREMOTEHOST DATEFOUR DAYOFWEEK channel flags #8 = NODEFRAGMENT EXQUOTA REVERSE NOCONVERT_OCTET_STREAM channel flags #9 = NOTHURMAN INTERPRETENCODING text/plain charset def = (7) US-ASCII 5 (8) ISO-8859-1 51 channel envelope address type = SOURCEROUTE channel header address type = SOURCEROUTE channel official host = mailserver.eng.alpha.com channel local alias = channel queue name = channel after param = channel daemon name = channel user name = notices = channel group ids = header To: address = joe.blue@mailserver.eng.alpha.com header From: address = joe.blue@mailserver.eng.alpha.com envelope To: address = joe.blue@mailserver.eng.alpha.com (route (mailserver.eng.alpha.com,mailserver.eng.alpha.com)) envelope From: address = joe.blue@mailserver.eng.alpha.com name = mbox = joe.blue Extracted address action list: joe.blue@mailserver.eng.alpha.com Extracted 733 address action list: joe.blue@mailserver.eng.alpha.com Expanded address: joe.blue@mailserver.eng.alpha.com Submitted address list: ims-ms joe.blue@ims-ms-daemon (sims-ms-daemon) *NOTIFY FAILURES* *NOTIFY DELAYS* Submitted notifications list: Address: # |
In the following example, the sample PAGER mapping is tested. The -mapping_file option is used to select the mapping file pager_table.sample instead of the default mapping file.
imsimta test -mapping -noimage_file \ -mapping_file=msg_svr_base/config/pager_table.sample |
In the following example, the sample mapping pattern $[ax1]*@*.xyz.com is tested for several sample target strings:
imsimta test -match Pattern: $[ax1]*@*.xyz.com [ 1S] cglob [1ax] [ 2] "@" [ 3S] glob, req 46, reps 2 [ 4] "." [ 5] "x" [ 6] "y" [ 7] "z" [ 8] "." [ 9] "c" [ 10] "o" [ 11] "m" Target: xx11aa@sys1.xyz.com Match. 0 - xx11aa 1 - sys1 Pattern: $[ax1]*@*.xyz.com Target: 12a@node.xyz.com No match. Pattern: $[ax1]*@*.xyz.com Target: 1xa@node.acme.com Match. 0 - 1xa 1 - node Pattern: ^D % |