impurge

The impurge utility removes messages from the Message Store that are no longer referenced from any user folders, and returns the space to the file system. When a user deletes a message, the reference to the message is also removed. Eventually, all users who received the message may remove their references. When the last reference is gone, the message can be purged from the store.

The purge operation requires a considerable amount of time and system resources. Do not wait until your disk is full before attempting a message purge. Run impurge while there is more disk space than the amount of space used by the message store on the busiest 24 hour period of the message store. You can check the message store disk usage by noting the disk usage increase on the /var/opt/SUNWmail/ims partition over a 24 hour period.


Note - Messages under 2 days old will not get purged.

Syntax

 
impurge [ -av ] [ -p percentage ] [ -s size ] [-l config_file_location]
 



-a  

Do an exhaustive search to locate all messages that can be purged and purge all of them. Note that if the -a option is used, the -p and -s options cannot be used.  

-p percentage  

Percentage purge-If the total amount of disk space recovered by removing messages marked for deletion exceeds a specified percentage of the total message traffic received on a particular day, then a purge operation is performed. For example, if you specified 10 percent for the percentage purge option, each day a computation is performed to determine if the total amount of space recovered by removing messages marked for deletion exceeds 10 percent of total message traffic received on this particular day.

If on a particular day, the total amount of space recovered equals 9.5 percent, then the purge operation is not performed. If a few days later, the total amount of space recovered equals 10.3 percentage, then the purge operation is performed.The intent of the percentage option is to speed up the purge process by not purging every day and each time that impurge is run, but only those days when enough space can be gained.  

-s size  

Perform the purge only for the days where the amount of space that would be reclaimed exceeds the specified size. The size can be entered in bytes or kilobytes, using the suffix K; megabytes, using the suffix M; or gigabytes, using the suffix G.  

-v  

Verbose-provides details of the purge operation; otherwise, impurge is silent unless an error occurs.  

-l config_file_location  

Location of Message Access Services configuration file (ims.cnf). If the -l option is not specified, the default location (/etc/opt/SUNWmail/ims/) will be used.  

The options for this command are:


Examples

The following sample represents a small work group with 500 Mbyte of storage for user mailboxes that has decided to reclaim space every morning, but only if 10 Mbyte or more of disk space can be reclaimed.

 
% impurge -s 10M
 

For the next example, assume that a larger work group has 10 Gbyte of storage, and on a typical day 5 Mbyte of new mail is received, although this can vary. For efficiency, the site decides to use impurge every morning, but only if the reclaimed space is half as large as the particular day's mail messages. Using this formula, if that day's traffic is 40 Mbyte, then the impurge for that day must find at least 20 Mbyte to reclaim, or else impurge is skipped. This command line would look like the following:

 
% impurge -p 50
 

The percentage stipulation is used for performance reasons, and it would not be worthwhile to purge a day's data if the amount of that data was not significant.


Note - impurge -a will clear the PENDING flag set by imexpire.



Copyright © 1999 Sun Microsystems, Inc. All Rights Reserved.