Sun Java System Messaging Server 6.3 Administration Reference

imcheck

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

Syntax


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

imcheck -d databasename 

imcheck -s [-n]

Options

The options for this command are:

Option  

Description  

-c messagenum

Prints cache data for the specified message number. 

-d databasename

Dumps the contents of the database specified by databasename.

-D

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

-e

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

-n

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. 

-s

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:

HSize

Header size

MT

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

SFlags

System flags. The system flags are as follows:


Recent
Deleted
Seen
Answered
Flagged
Draft
Archived

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:

0010000

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

UFlags

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

3f0000

indicates that all six flags are set.

Examples

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
Userflags:
  f1
  f2
  f3
  f4
  f5
  f6
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   
Message-id
-----------------------------------------------------------------------
     1      2 20000621093214 19980719234108     1094   768     7856
20060621104501 20060621104501  0 0010000 000000 1008099883-2     
<0EWD00M09RWKOY@dumbo.sesta.com>
     2      3 20000621093214 19980719234108     1094   768     9468
20060621104501 20060621104501  0 0010000 000000 1008099930-3     
<0EWD00M09RWKOY@dumbo.sesta.com>
     3      4 20000621093214 19980719234108     1094   768    11080
20060621104501 20060621104501  0 0010000 3f0000 1008099930-4     
<0EWD00M09RWKOY@dumbo.sesta.com>