Sun Java System Messaging Server 6.3 Administration Reference


The imcheck utility prints mailbox data and metadata. In addition, imcheck prints mboxlist database data for specified database files and prints database statistics.


imcheck [-m mailbox [-c messagenum] | -p partition | -f file] [-e] [-D [-S separator]]

imcheck -d databasename 

imcheck -s [-n]


The options for this command are:



-c messagenum

Prints cache data for the specified message number. 

-d databasename

Dumps the contents of the database specified by databasename.


Dumps metadata in imsbackup format to verify the success of the backup operation.


Prints the uids of expunged messages. 

-f file

Prints metadata for the mailboxes listed in the specified file. You must specify a full path name for file.

-m mailbox

Prints metadata for the specified mailbox. For information about the output produced by this option, see imcheck —m Metadata Output


Specifies that no locking will occur. This option should be used only for debugging database hang problems. 

Caution – Caution –

Do not use this option when the database is not hung; it can cause data corruption in the message store.

-p partition

Prints metadata for every mailbox in the specified message store partition. 


Prints database statistics. 

-S separator

Specifies an output field separator. The default value is a vertical bar: “|”. 

imcheck —m Metadata Output

The imcheck -m mailbox command displays metadata that describes the entire mailbox and metadata that describes each message.

The message-specific data is displayed in a table. Most of the fields in the table are self-explanatory. However, the following fields need further explanation:


Header size


Message type ID, defined by configutil parameters such as store.messagetype.* and store.messagetype.enable. For a list of these parameters, see configutil Parameters.


System flags. The system flags are as follows:


In the imcheck -m mailbox output, the system-flag metadata is displayed as a list of zeros and ones. A one (1) means a particular flag is set; a zero (0) means the flag is not set. The list of zeros and ones corresponds to the flags shown in the preceding list, in the order shown above. For example:


indicates that the Seen flag has been set, and no other flags are set.


Flags defined by the user. User-flags are displayed as a hex number. The binary form of the hex number represents the user-flag switches. For example, if the user has defined six flags, the value


indicates that all six flags are set.


To dump metadata to verify the imsbackup operation performed on the user jdoe's INBOX, separating the output with a colon (“:”):

imcheck -D -S : -m /user/jdoe/INBOX

To dump the contents of the folder.db database:

imcheck -d folder.db

To print metadata for the inbox of the user jdoe:

imcheck -m user/jdoe/INBOX 
Name: user/jdoe
Version: 102
Exists: 10
Flags: 0
Largest Msg: 1094 bytes
Last Append: 20060623164746
Last UID: 1008276527
Oldest Msg: 20000621093214
Oldest Uid: 2
Quota Used: 10061
UID Validity: 1008099930
Cache Offset: 7856
Start Offset: 256
ACL: jdoe      lrswipcda
Subscribed: 0
Partition: primary
Path: /var/opt/SUNWmsgsr/store/partition/primary/=user/64/b1/=jdoe
Msg Path: /var/opt/SUNWmsgsr/store/partition/primary/=user/64/b1/=jdoe

 MsgNo    Uid  Internal Date      Sent Date     Size HSize CacheOff  
Last Updated      Save Date MT  SFlags UFlags   Original-Uid   
     1      2 20000621093214 19980719234108     1094   768     7856
20060621104501 20060621104501  0 0010000 000000 1008099883-2     
     2      3 20000621093214 19980719234108     1094   768     9468
20060621104501 20060621104501  0 0010000 000000 1008099930-3     
     3      4 20000621093214 19980719234108     1094   768    11080
20060621104501 20060621104501  0 0010000 3f0000 1008099930-4