56 Managing Message Types in the Message Store

This chapter describes how to work with Oracle Communications Messaging Server message types. See "Message Store Message Type Overview" for conceptual information.

To Configure Message Types

To configure a message type, use the msconfig utility to set the store.messagetype option values that define and identify the message type.

  1. Enable message types by setting the store.messagetype.enable option to 1. This option enables the message store to identify and manipulate message types. You must set this option before you can configure an individual message type. For example, type the following command:

    msconfig set store.messagetype.enable 1
    
  2. Define and identify the message type by setting store.messagetype.mtindexx options. The variable x identifies this particular message type in the message store. The variable x must be an integer greater than zero and less than 64. You can define up to 63 message types by iteratively configuring this option with unique integers. You define the value of the message type with a text string that describes the type.

    • For example, to define a text message type, type the following command:

      msconfig set store.messagetype.mtindex:1.contenttype text/plain
      
    • To define a voice message type, type the following command:

      msconfig set store.messagetype.mtindex:2.contenttype multipart/voice-message
      
  3. Provide a flag name for the message type by setting the store.messagetype.mtindex:x.flagname option. This option creates a unique flag that identifies the message type. The flag is automatically set whenever a message of this type first arrives in the message store and remains associated with the message until it is purged. The flag name value is a text string that describes the message type. It does not have to be the same as the value set with the store.messagetype.mtindex:x option. The variable x is the integer ID of the message type defined with the store.messagetype.mtindex:x option. For example, to define flag names for the message types configured in the preceding step, type the following commands:

    msconfig set store.messagetype.mtindex:1.flagname text
    msconfig set store.messagetype.mtindex:2.flagname voice_message
    
  4. Configure a quota root name for the message type by setting the store.messagetype.mtindex:x.quotaroot option. This option enables the quota function to identify and manage a quota root for this message type. The option value is a name-a text string that describes the message type. It does not have to be the same as the value set with the store.messagetype.x option. The variable x is the integer ID of the message type defined with the store.messagetype.x option. When this option is configured, you can set a quota that applies to the specified message type. See "Administering Quotas by Message Type" for more information. For example, to enable the use of quota roots for the message types configured in the preceding steps, type the following commands:

    msconfig set store.messagetype.mtindex:1.quotaroot text
    msconfig set store.messagetype.mtindex:2.quotaroot voice
    
  5. To configure an alternate header field for identifying the message type, set the store.messagetype.header option. By default, the message store reads the Content-Type header field to determine the message type. Configure the store.messagetype.header option only if you want to use a different header field for identifying the message type. The value of this option is a text string. For example, to use a field called X-Message-Type, enter the following command:

    msconfig set store.messagetype.header X-Message-Type
    

Sending Notification Messages for Message Types

Notifications can deliver status information about messages of different types, such as text messages, voice mail, and image data. Messaging Server uses Message Queue to send notification information for message types.

To enable the JMQ notification plug-in to recognize a particular message type, you must configure the store.messagetype options, including the store.messagetype.mtindex:x.flagname option.

Once the message types have been configured, JMQ notification messages can identify the particular message types. You can write a Message Queue client to interpret notification messages by message type and deliver status information about each type to the mail client.

The JMQ notification function counts the number of messages currently in the mailbox, by message type. Instead of sending one count, an array specifying the count for each message type is sent with the notification message. For example, a NewMsg notification message can carry data to users informing them that their inbox has new voice mail and text messages.

Administering Quotas by Message Type

When you set a quota for a message type, you include that value in a quota root. A quota root specifies quotas for a user. It can specify different quotas for particular message types and mailbox folders, and it can specify a default quota that applies to all remaining message types, folders, and messages not defined by type.

See "Quota Theory of Operations" for complete information about setting and managing quotas.

Before You Set Message-Type Quotas

Before you can set quotas for message types, you must configure the following options:

  • Set the store.messagetype.mtindex:x.quotaroot option for each message type. See "To Configure Message Types" for details.

  • Set the store.typequota.enable option to 1. For example, type the following command:

    msconfig set store.typequota.enable 1
    

Methods of Setting Message-Type Quotas

Use one of the following methods to set quotas for message types:

  • Set message-type quotas for a user with the LDAP attributes mailQuota or mailMsgQuota (or both).

    For information about how to set quota roots with these attributes, see the mailQuota and mailMsgQuota entries in Schema Reference.

  • Set default message-type quotas that apply to all individual users when the mailQuota and mailMsgQuota attributes are not set.

    To set default quotas, use the store.defaultmessagequota or store.defaultmailboxquota option (or both).

    See "Managing Message Store Quotas" for information about how to set quota roots with these options.

When you set a quota for the message type with a msconfig option or LDAP attribute, you must use the quota root specified with the store.messagetype.mtindex:x.quotaroot option.

Example of a Message-Type Quota Root

The example described in this section sets the following quotas for the user joe:

  • The default mailbox storage quota is 40 MBytes.

  • The default mailbox message quota is 5000.

  • The storage quota for the Archive folder is 100 MBytes.

  • The storage quota for text message types is 10 MBytes.

  • The message quota for text message types is 2000.

  • The storage quota for voice message types is 10 MBytes.

  • The message quota for voice message types is 200.

This quota root permits greater storage in the Archive folder (100 MBytes) than in all the other folders and message types combined (60 MBytes). Also, no message limit is set for the Archive folder. In this example, only storage limits matter for archiving.

The message types have both storage and number-of-message quotas. The message-type quotas apply to the sum of all messages of those types, whether they are stored in the Archive folder or in any other folder.

The default mailbox quotas apply to all messages that are not text or voice message types and are not stored in the Archive folder. That is, the message-type quotas and Archive quota are not counted as part of the default mailbox quotas.

To set the quota root in this example:

  1. Configure the store.messagetype.mtindexx.quotaroot option as follows:

    msconfig set store.messagetype.mtindex:1.quotaroot text
    msconfig set store.messagetype.mtindex:2.quotaroot voice
    
  2. Configure the mailQuota attribute for the user joe as follows:

    mailQuota: 20M;#text%10M;#voice%10M;Archive%100M
    
  3. Configure the mailMsgQuota attribute for the user joe as follows:

    mailMsgQuota: 5000;#text%2000;#voice%200
    

When you run the getquotaroot IMAP command, the resulting IMAP session displays all quota roots for the user joe's mailbox, as shown here:

1 getquotaroot INBOX
* QUOTAROOT INBOX user/joe user/joe/#text user/joe/#voice
* QUOTA user/joe (STORAGE 12340 20480 MESSAGE 148 5000)
* QUOTA user/joe/#text (STORAGE 1966 10240 MESSAGE 92 2000)
* QUOTA user/joe/#voice (STORAGE 7050 10240 MESSAGE 24 200)
2 getquotaroot Archive
* QUOTAROOT user/joe/Archive user/joe/#text user/joe/#voice
* QUOTA user/joe/Archive (STORAGE 35424 102400)
* QUOTA user/joe/#text (STORAGE 1966 10240 MESSAGE 92 2000)
* QUOTA user/joe/#voice (STORAGE 7050 10240 MESSAGE 24 200)

Expiring Messages by Message Type

The expire and purge feature enables you to move messages from one folder to another, archive messages, and remove messages from the message store, according to criteria you define in expire rules. You perform these tasks with the imexpire utility. Because the imexpire utility is run by the administrator, it bypasses quota enforcement. See "Configuring Message Expiration (Tasks)" for information about how to write expire rules and use the imexpire utility.

You can write expire rules so that messages of different types are expired according to different criteria. The expire feature is extremely flexible, offering many choices for setting expire criteria. This section describes one example in which text and voice messages are expired according to different criteria.

The following example assumes you have configured text and voice message types as follows:

store.messagetype.mtindex:1 text/plain
store.messagetype.mtindex:2 multipart/voice-message

Assume also that the message store is configured to read the Content-Type header field to determine the message type.

Example: Sample Rules for Expiring Different Message Types

TextInbox.folderpattern: user/%/INBOX
TextInbox.messageheader.Content-Type: text/plain
TextInbox.messagedays: 365
TextInbox.action: fileinto:Archive
VoiceInbox.folderpattern: user/%/INBOX
VoiceInbox.messageheader.Content-Type: multipart/voice-message
VoiceInbox.savedays: 14
VoiceInbox.action: fileinto:OldMail
VoiceOldMail.folderpattern: user/%/OldMail
VoiceOldMail.messageheader.Content-Type: multipart/voice-message
VoiceOldMail.savedays: 30
VoiceOldMail.action: fileinto:Trash
Trash.folderpattern: user/%/Trash
Trash.savedays: 7
Trash.action: discard

In this example, text messages and voice mail are expired in different ways, and they follow different schedules, as follows:

  • Text messages are moved from a user's inbox to the user's Archive folder one year after they arrive in the message store.

  • Voice mail is moved from the inbox to the OldMail folder after two weeks. If the user saves a voice message, the saved date is reset, and the message is moved two weeks after the new date.

  • Voice mail is moved from the OldMail folder to the Trash folder after 30 days. The user also can save a voice message in the OldMail folder, which postpones the removal of the message for another 30 days after the new saved date.

  • Messages of all types are discarded seven days after they are moved to the Trash folder. The expire rules move voice mail to Trash automatically. Text messages are moved to Trash when a user deletes them.

Note:

The savedays rule causes a message to be expired the specified number of days after the message is saved. In a typical voice mail system, a user can save voice mail on the voice mail menu. For text messages, a message is saved when it is moved to a folder. The messagedays rule causes a message to be expired the specified number of days after it first arrives in the message store, no matter which folder it is stored in or how often it is moved.