The imcheck command validates the message store and the user files, reports errors, and generates message store reports. In addition to validating the message store and generating reports, it also allows you to recover the message store from a crash.
Messages may be lost if a crash occurs after the messages have been removed from mail queue by IMTA, but have not yet been "sync-ed" in the user file. When the -c option is specified, imcheck looks at all the messages delivered to the message store within the last few minutes before the crash, verifies if they are in the user files, and redelivers those that are not. Users may get the same message twice after a crash recovery.
Except for the -f and -l options, each option must be specified in a separate command. In other words, you cannot combine the -d, -r, -u, -c, and -t options together in one command.
The following options are used with imcheck:
-d [date]
|
Generates a detailed store report. If a specific date is given (in the form yyyymmdd), imcheck generates a report for the specified date.
|
-r [date]
|
Generates a regular report. If a specific date is given (in the form yyyymmdd), imcheck generates a report for the specified date.
|
-c
|
Perform a crash recovery. This selection can only be used after a crash. It must be run before the IMTA has started and should not be running with IMTA at the same time.
|
-f filename
|
Redirect all output to the file filename. The file is placed in the current working directory. It is not placed under ADM_ROOT. filename can be an absolute path.
|
-u [user]
|
Generate a user report for all message store users. If a specific user name is given, imcheck generates a user report for the specified user; otherwise, a report for all users is generated.
|
-t
|
Check if the message store has potentially been corrupted.
|
-l config_file_location
|
Location of the 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 following example generates report for the user "Jane" and directs the output to a file named "outputfile."
|
|
# imcheck -u Jane -f outputfile
|
|
The following output is an example of a regular report (imcheck -r):
|
|
verbose store report with verification on Fri Oct 10
15:54:58 1997
|
|
|
Data for 1 year(s) follows:
|
|
|
1997 30 day(s), 3 bucket(s) per day
|
|
|
1001 n-recs end-of-file verify_data
|
|
|
1002 n-recs end-of-file verify_data
|
|
|
1003 n-recs end-of-file verify_data
|
|
|
Data for 1 years(s) follows:
|
|
|
n-bkts complexity n-entries next-entry verify_links
ParseLevel Version
|
|
|
1001 3 COMPLETEPARSE 1190 1191 ok
3 0.0
|
|
|
1002 3 COMPLETEPARSE 2509 2510 ok
3 0.0
|
|
|
1003 3 COMPLETEPARSE 2532 2533 ok
3 0.0
|
|
|
1004 3 COMPLETEPARSE 1472 1473 ok
3 0.0
|
|
|
1005 3 COMPLETEPARSE 0 1 ok
3 0.0
|
|
The following output is an example of a detailed report (imcheck -d):
|
|
verbose store report with verification on Fri Oct 10 15:55:18 1997
|
|
|
Data for 1 year(s) follows:
|
|
|
1997 30 day(s), 3 bucket(s) per day
|
|
|
1001 n-recs end-of-file verify_data
|
|
|
1002 n-recs end-of-file verify_data
|
|
|
1003 n-recs end-of-file verify_data
|
|
|
Data for 1 years(s) follows:
|
|
|
********1001*************************************
|
|
|
INDEXDIR: Index_Rec_Offset = 12
|
|
|
INDEX: Index_Rec_Size = 344
|
|
|
Mdata_file = 1997/1001/003
|
|
|
MSGDATA: Record_size = 4997
|
|
|
|
INDEXDIR: Index_Rec_Offset = 356
|
|
|
INDEX: Index_Rec_Size = 344
|
|
|
Mdata_file = 1997/1001/001
|
|
|
MSGDATA: Record_size = 2362
|
|