Sun Java System Messaging Server 6.3 Administration Guide

17.3 Vacation Autoreply Theory of Operation

The vacation action, when invoked, works as follows:

  1. The Sun Java System Messaging Server checks to make sure that the vacation action was performed by a user level rather than a system level Sieve script. An error results if vacation is used in a system level script.

  2. The “no vacation notice” internal MTA flag is checked. If it is set, processing terminates and no vacation notice is sent.

  3. The return address for the message is now checked. If it is blank, processing terminates and no vacation notice is sent.

  4. The MTA checks to see if the user's address or any of the additional addresses specified in the :addresses tagged argument appear in a To:, Cc:, Resent-to:, or Resent-cc: header field for the current message. Processing terminates and no vacation notice is sent if none of the addresses is found in any of the header fields.

  5. The Messaging Server constructs a hash of the :subject argument and the reason string. This string, along with the return address of the current message, is checked against a per-user record of previous vacation responses. Processing terminates and no response is sent if a response has already been sent within the time allowed by the :days argument.

  6. The Messaging Server constructs a vacation notice from the :subject argument, reason string, and :mime argument. Two basic forms for this response message are possible:

    • A message disposition notification of the form specified in RFC 2298, with the first part containing the reason text.

    • A single part text reply. (This form is only used to support the “reply” autoreply mode attribute setting.)

Note that mailautoreplymode is automatically set to reply when vacation messages are configured through Messenger Express.

The “no vacation notice” MTA flag is clear by default. It can be set by a system level Sieve script through the use of the nonstandard novacation action. The novacation Sieve action is only allowed in a system level Sieve script. It will generate an error if it is used in a user level script. You can use this action to implement site-wide restrictions on vacation replies such as blocking replies to addresses containing the substring “MAILER-DAEMON”.

Per-user per-response information is stored in a set of flat text files, one per local user. The location and naming scheme for these files is specified by the setting of the VACATION_TEMPLATE MTA option. This option should be set to a file: URL.

Maintenance of these files is automatic and controlled by the VACATION_CLEANUP integer MTA option setting. Each time one of these files is opened, the value of the current time in seconds modulo this value is computed. If the result is zero the file is scanned and all expired entries are removed. The default value for the option is 200, which means that there is 1-in-200 chance that a cleanup pass will be performed.

The machinery used to read and write these flat text files is designed in such a way that it should be able to operate correctly over NFS. This allows multiple MTAs to share a single set of files on a common file system.