Sun Java System Messaging Server 6 2005Q4 Administration Guide

To Schedule Automatic Message Removal and Logging Level

Automatic message removal is activated by the imsched scheduling daemon. By default, imsched invokes imexpire at 23:00 every day, and messages are both expunged and purged. This schedule can be customized by setting the configutil parameters local.schedule.expire, local.schedule.purge, and store.cleanupage described in Table 18–10.

Expire and purge can take a long time to complete on a large message store, so you may wish to experiment and decide how often to run these processes. For example, if an expire/purge cycle takes 10 hours, you may not want the default schedule of running expire and purge once a day. Schedule expire and purge by using local.schedule.purge to specify a separate schedule for purge. If local.schedule.purge is not set, imexpire will perform purge after an expire.

Table 18–10 Expire and Purge configutil Log and Scheduling Parameters

Parameter  

Description 

local.schedule.expire

Interval for running imexpire. Uses UNIX crontab format:minute hour day-of-month month-of-year day-of-week

The values are separated by a space or tab and can be 0-59, 0-23, 1-31, 1-12 or 0-6 (with 0=Sunday) respectively. Each time field can be either an asterisk (meaning all legal values), a list of comma-separated values, or a range of two values separated by a hyphen. Note that days can be specified by both day of the month and day of the week, however, it is not typical to use them both since the number of such occurrences are very small. If they are both specified, then both will be required. For example, setting the 17th day of the month and Tuesday will require both values to be true. 

Interval Examples:

1) Run imexpire at 12:30am, 8:30am, and 4:30pm: 30 0,8,16 * * * /opt/SUNWmsgsr/lib/imexpire

2) Run imexpire at weekday morning at 3:15 am: 15 3 * * 1-5 /opt/SUNWmsgsr/lib/imexpire

3) Run imexpire only on Mondays: 0 0 * * 1 /opt/SUNWmsgsr/lib/imexpire

Default: 0 23 * * * /opt/SUNWmsgsr/lib/imexpire

local.schedule.purge

Interval for running purge. Uses UNIX crontab format:minute hour day-of-month month-of-year day-of-week.

Default: 0 0,4,8,12,16,20 * * * /opt/SUNWmsgsr/lib/purge -num=5 (Every four hours.) 

store.cleanupage

Age (in hours) of expired or expunged message before purge will permanently remove it.

Default: None 

local.store.expire.loglevel

Specify a log level: 

1 = log summary for the entire expire session.  

2 = log one message per mailbox expired.  

3 = log one message per message expired. 

Default: 1 

imexpire Scheduling Using the Console

Bring up the automatic message removal GUI as follows:

Main Console > Server Group > Messaging Server (Open) >Messaging Server Console > Configuration Tab > Message Store > Expire/Purge

This Console page lists the expire rules on the top and the expire and purge schedule on the bottom. To schedule expire and purge, use the pull down menus in the Expire/Purge Schedule to set the month, day of month, day of week (with 0=Sunday), hours of day and minute of hours for both expire and purge.


Note –

The day value may be set by both day of the month and day of the week. Both are adhered to if both are set. If you set the 3rd day of the week (Wednesday) and the 17th day of the month, then a purge/expire will only occur on the 17th day of each month that falls on a Wednesday).


Setting imexpire Logging Levels

imexpire will log a summary to the default log file upon completion. If expire is invoked from the command line, the -v (verbose) and -d (debug) option can be used to instruct imexpire to log detail status/debug messages to stderr. If imexpire is invoked by imsched, the configutil parameter local.store.expire.loglevel can be set to 1,2 or 3 for different levels of logging. Loglevel 1 is the default, it will log a summary for the entire expire session. Loglevel 2 will log one message per mailbox expired. Loglevel 3 will log one message per message expired.

Excluding Specified Users from Automatic Message Remove

Exclude specified users from the expire rules by adding their user ID, one per line, in a file called expire_exclude_list in msg_svr_base/config/.