Page 22 - Mercury Manual.book
P. 22

17     The Mercury Core Module
                Template files




               Time to perform daily maintenance tasks  Just what the title suggests. Enter the time you want
               Mercury to perform its tasks in 24-hour format - so, 22:00 for 10pm. Mercury will perform
               its maintenance tasks on the first poll cycle after the specified time.

               Exit and restart each day after performing daily maintenance   In rare instances, you may
               wish to restart Mercury each day (for instance, your network connection may need to be re-
               linquished periodically in order to keep it alive). If you check this control, then Mercury will
               perform a graceful shutdown after it has completed its daily maintenance tasks. If you are us-
               ing the Mercury loader program, LOADER.EXE, to run it, the loader will restart Mercury after
               a three second delay.

               Template files


               Template files are files used by Mercury to generate messages automatically. In a template
               file, you can enter plain text, and also special substitution characters that Mercury will replace
               with system-specific information. Delivery failure notifications, confirmations of delivery
               and some of the mail server responses are formatted using template files.

               A template file is a plain text file and can be created using any standard editor, for example
               the Windows NOTEPAD command. It must be formatted as a mail message - in fact, the first
               four lines of the message will usually look something like this:

                  From: postmaster@~N (Mail System Administrator)
                  To: ~T
                  Subject: Confirmation of delivery
                  Date: ~D

               The ~N, ~T and ~D characters are special substitutions, replaced with the system’s domain
               name, the recipient’s mail address and the date respectively. The rest of the message can take
               any form you wish and you can use any of the special substitutions as often as you need.

               Mercury recognizes the following substitutions in template files:

                       ~~     A single tilde character
                       ~D     The date, in proper RFC822 format
                       ~T     The recipient’s mail address                                        The number of lines cop-
                       ~G     The first x lines of the message                                    ied from the original mes-
                       ~M     The entire original message                                         sage is controlled by the
                                                                                                  setting in the Mercury
                       ~B     The entire original message body (no headers)                       core module configura-
                       ~R     The failure text, or mail server search results                     tion dialog.
                       ~S     The subject field from the original message
                       ~N     The current system’s Internet domain name
                       ~Y     A valid MIME Multipart boundary separator


               Using Multipart MIME format in Template files   MIME is the dominant Internet standard for
               message formatting. One of the more powerful features of MIME is its ability to generate
               messages with multiple parts: in order to do this, you need to add some special headers to the
               message, and to separate the parts of the message from each other using a special boundary
               string. To generate a Multipart MIME message in a template file, add the following two lines
               to the headers of your template file, exactly as they are shown:

                  MIME-Version: 1.0
   17   18   19   20   21   22   23   24   25   26   27