Page 44 - Mercury Manual.book
P. 44
39 Policies
Sample policies
~A Replaced by the name of a file containing the entire text of the
message
~R Replaced by the name of the result file (see above)
~S Replaced by the name of the sentinel file (see above)
~F Replaced by the "original" filename for the attachment as stored in
the message
~Z Replaced by the extension part of the "original" filename for the at-
tachment, as stored in the structure of the message
~Y Replaced by the current year expressed as two digits
~M Replaced by the current month expressed as two digits
~D Replaced by the current day of the month, expressed as two digits
~W Replaced by the current week of the year, expressed as two digits
The date substitutions are provided largely to allow you to do simple archiving of mail: they
can be used to construct file or directory names as required.
Policy issues
Performance Each policy you define will slow down the processing of mail in the Mercury
queue somewhat. Depending on the complexity of the task and the size of the message, this
performance reduction can range from negligible to quite significant. If your system is ex-
tremely busy (for example, more than 750 messages per hour) you should monitor carefully
the impact that policy application has on your server's mail throughput. Having any active
policy task that can modify the content of the jobs it examines will further extend the time
taken by policy processing.
Timeouts and crashes If a policy task crashes or hangs, Mercury will timeout after 90 sec-
onds. In this case, Mercury treats the message as having passed the task's tests, and will allow
it to be processed normally. During the time that Mercury is waiting for the timeout, however,
no mail will be processed in the central queue - so it is obviously important for you to ensure
that your policy tasks are reliable and complete as quickly as possible.
Sample policies
Several sample policies exist in the Pegasus Mail and Mercury knowledgebase, an online ref-
erence stored at http://kbase.pmail.gen.nz. Please use this URL to examine the knowledge-
base articles on Mercury/32: http://kbase.pmail.gen.nz/mercury32.cfm.