Sun Java System Messaging Server 6.3 Administration Reference

imexpire

imexpire automatically expires messages in the message store based on administrator-specified criteria. imexpire is executed in two phases. The first phase expires messages that meet the expire criteria; the second phase purges (removes) from the message store all messages that have been discarded by imexpire or expunged by users.

Expire Actions

The expire phase can perform one of these actions:

By default, imexpire discards messages.

For details about how the imexpire actions can be performed, see To Set the Automatic Message Removal (Expire and Purge) Feature in Sun Java System Messaging Server 6.3 Administration Guide

Expire Criteria

The expire criteria can be set with configutil parameters or in a file called store.expirerule. (See see To Set the Automatic Message Removal (Expire and Purge) Feature in Sun Java System Messaging Server 6.3 Administration Guide for detailed usage information.) The following criteria can be specified:

You can use imexpire to install a local expire rule file (store.expirerule) without conflicting with existing expire rules. If an expire rule file configured for the same partition or mailbox is executing while you try to install a new expire rule file, a warning message appears and the new expire rule file is not installed. Use the imexpire -i option to install a local expire rule file.

You can exclude a particular user or mailbox folder from all expire criteria by setting the exclusive expire rule for that user or mailbox without specifying any other rules in the expire rule file.


Note –

The functionality of imexpire has been expanded and the interface has changed since earlier versions of Messaging Server. However, this version continues to support older imexpire configurations.


Requirements

imexpire must run locally on the Messaging Server; the stored utility must also be running.

Location

The location of imexpire is msg-svr-base/sbin.

Syntax


imexpire [-c | -e] [-n] [-d] [-v num] [-p partition | -u user]
[-t num][-r num] [-m num] [-f file]

imexpire -i {-p partition | -x mailbox} -f file

Options

The options for this command are:

Option  

Description  

-c

Do purge (clean up) only—do not expire. Remove expunged and expired messages. 

-e

Do expire only—do not purge. 

-f file

Use the expire rules specified in file. All other expire rules are ignored.

When used with the -i option, -f file refers to the expire-rule file to be installed.

Use a full path name to specify file. The expire rules in file must use the same format as the rules in the global expire configuration file.

-i  

Install a local expire-rule configuration file. This option must be used with either the -p partition option to specify a message store partition or the -x mailbox option to specify a mailbox. In addition, it must be used with the -f file option to specify the expire rule file to install.

-n

Trial run only—do not perform expire or cleanup. A description of what would happen without this flag is output. 

-v 0|1|2

Log expire statistic. The number specifies the loglevel, where 

0= store level 

2 = mailbox level 

3 = message level 

Messages are logged to the log file by default. When the -d option is used, messages go to stdout.

-d

Display debug output to stdout/stderr.

-p message_store_partition

Expire/Purge the message store partition specified. 

-u user

Expire/Purge the specified user. 

-t num

Maximum number of threads per process. Default is 50.

-r num

Maximum number of threads per partition. Default is 1.

-m num

Maximum number of rules in a policy. Default is 128.

-x mailbox

Name of the mailbox to which the local expire rules apply. This option is used with the -i option to install a local configuration file that will expire messages in the specified mailbox and its sub-folders.

Examples

Purge expunged messages with verbose output.


imexpire -c -v

Install a local expire rule configuration file for the user jdoe. These expire rules will apply to jdoe's memos folder.


imexpire -i -x user/jdoe/memos 
-f /home/jdoe/store.expirerule