MESSAGE-SAVE-COPY mapping table format and examples

The format of a  mapping table entry is, by  default: out-channel&#x7c;return-address&#x7c;D&#x7c;orig-file-path $Yresult-file-path where   is the destination channel out which the message is being dequeued,    is the envelope From address, and    and    are full file path  specifications. Note that the template (right hand side) of the mapping table entry must include one of the flags $Y, $y, $T, or $t in order  for the rename to be attempted.

If the new-in-6.3    MTA option has all of its bits set  (corresponding to a value of 7), then the probe format instead becomes transport-info&#x7c;app-info&#x7c;source-channel&#x7c;conv-tags&#x7c;out-channel&#x7c;return-address&#x7c;D&#x7c;orig-file-path where the   and     are as usually defined  (  in particular corresponding to  the fields seen in a    probe) --  see for instance their  discussion in the discussion of the    mapping table  or in the discussion of the    MTA option;  where   is the  original source channel; and where    consists of any current conversion tags.

As a rename operation is used to rename the original file to the result (copied) file, the result file specification must be on the same disk  as the original file path, and the path must be writable by the MTA. However, normally an area under the   area should not be used  as the result location, as that is the MTA&#x27;s area for message files  that it expects to be eligible for MTA automatic processing. Thus normally an area on the same disk, and owned by the MTA, but outside  the actual   area itself, should be used as the place to which  to copy (rename) the message files.

As of the 8.0 release,  provides a means of copying message files instead of, or in addition to, renaming them. If $G is specified, then a file name is read from the mapping result and the current message file is copied there. If both $G and $Y are specified, then the file is both copied and renamed; in this case the mapping result must be of the form: $Y$Gcopy-file-name&#x7c;rename-file-name If $Q is specified in addition to $Y, then an attempt will be made to tell the Job Controller  to process the message file in its new location. $Q is intended to be used when a message file is moved from one queue to      another.

Also new in 8.0 is the $S flag. $S can be used in a  mapping  to say that the message file has been renamed or otherwise processed by the mapping template and the file should simply be closed, not deleted or otherwise modified. $S is only effective if $Y is not specified.

As an example, to capture a copy of each message file being dequeued out to the Internet (out the    channel),  a mapping table as follows  might be used: MESSAGE-SAVE-COPY tcp_local&#x7c;&#x2a;&#x7c;D&#x7c;/opt/SUNWmsgsr/data/queue/tcp_local/%%%/&#x2a; \ $Y/opt/SUNWmsgsr/msg-save/tcp_local/$1$2$3/$4 Note how in the above example the assumption is that the   channel option  is in use on the   channel (so  that message files are stored in subdirectories under the    channel&#x27;s disk queue area), and how the subdirectory structure is  preserved due to the same values being substituted back in via the  template.

As another example, to capture a copy of message file being dequeued out to the Message Store via the    channel, a mapping table  such as the following might be used: MESSAGE-SAVE-COPY ims-ms&#x7c;&#x2a;&#x7c;D&#x7c;IMTA_QUEUE:ims-ms/%%%/&#x2a; \ $Y/opt/SUNWmsgsr/msg-save/ims-ms/$1$2$3/$4 To capture all messages from a particular user is straightforward via the   mapping table, by specifying that user&#x27;s address  as the   in the probe. However, capturing all messages to a particular user but only to that particular user via this facility would require a more complex  configuration of the rest of the MTA: prior to MS 6.3, such a task  would typically require use of a special delivery channel -- see  Additional ims-ms channels --  or in MS 6.3 or later, an alternative approach for  capturing messages to some special user(s) would be to configure the  user(s) in question with some special     value, set the     MTA option to 4 (or some value  including 4 in the bit mask) so that probes to    include conversion tags,  and then use conversion tag sensitive entries  in the   mapping table.

See also:
 * message_save_copy_flags MTA Option
 * PORT_ACCESS mapping table
 * Recipient access mapping tables
 * log_connection MTA Option
 * imta_queue MTA Option
 * Typical TCPIP channels and servers
 * subdirs Option
 * ldap_conversion_tag MTA Option
 * Job Controller
 * Additional ims-ms channels
 * MESSAGE-SAVE-COPY mapping table