Sun Java System Messaging Server 6.3 Administration Reference

imsimport

The imsimport utility migrates UNIX /var/mail format folders into a Sun Java System Messaging Server message store.

The imsimport utility extracts the messages stored in /var/mail mailboxes and appends them to the corresponding users’ mailbox in the Sun Java System Messaging Server message store. Files in the directory that are not in the standard UNIX mailbox format are skipped. If the corresponding users do not exist in the message store, imsimport creates them. When the user quota is exceeded, imsimport bypasses the message store quota enforcement, so the user does not receive an “over quota” message.

The imsimport utility can be run while Messaging Server is running. If mail delivery is enabled for the mailbox you are importing, old mail can get mixed with new mail, so you might want to hold the delivery of this user during the migration. Mailbox access should not be a problem.

When imsbackup, imsrestore, imsimport or any processing intensive operation takes significantly more system resources than normal, and continues doing so longer than the msprobe interval, there may be a temporary backlog of DB transaction log files to be cleared. If there are more files than specified in local.store.maxlog, then msprobe may erroneously restart all the processes during a restore. To prevent this from happening, disable msprobe during the imsbackup, imsrestore, and imsimport.


Note –

imsimport does not use the IMAP server. However, the stored utility must be running to maintain message store integrity. The LDAP server should be running if imsimport is expected to create new users.


Location: msg-svr-base/sbin/

Syntax


imsimport -u user -s file [-c y|n] [-d mailbox] [-e encoding]
[-b] [-g] [-i] [-n] [-v mode]

Options

The options for this command are:

Option  

Description  

-b 

Subscribes the destination mailbox folder when a new folder is created by the imsimport utility.

-c y|n

Provides an answer to the question: “Do you want to continue?” if an error occurs. Specify y for yes, n for no.

-d mailbox

Specifies the destination mailbox where the messages will be stored. 

-e encoding

Specify an encoding option. 

-g

Specifies debugging mode. 

-i

Ignores the content-length field 

-n

Creates a new mailbox with a .date extension if the mailbox exists. The .date extension is in the following form:

.mmddyy.HHMMSS

The month is specified by mm. The day is specified by dd. The year is specified by yy. For example, 052097 specifies May 20 in the year 1997. The time of day is specified by HHMMSS. For example 110000 specifies 11:00am.

-s file

Specifies the UNIX folder’s file name from which the messages are to be imported. The file parameter must be a full path name. This is a required option.

-u user

Specifies the message store identification for a user. Note that this should be identical in content and case to the UID attribute of the user's LDAP entry. If it is not the same, users will not be able to login to their INBOXES.  

-v mode

Specifies verbose mode. The values for mode are 0, 1, and 2. 0 specifies no output. 1 specifies mailbox level output. 2 (default) specifies message level output.

Examples

imsimport migrates the specified /var/mail/folder for the specified user to the Sun Java System Messaging Server message store. If the destination folder is not specified, imsimport calls the destination folder by the same name as the source folder. In the following example, the command migrates the default /var/mail INBOX for the user smith, to the INBOX.


imsimport -u smith -s /var/mail/smith -d INBOX

Similarly, if you are trying to move a folder called test from /home/smith/folders/ to the Sun Java System Messaging Server message store, use the following command:


imsimport -u smith -s /home/smith/folders/test -d test

If a destination folder called test already exists in the Sun Java System Messaging Server message store, imsimport appends the messages to the existing folder in the mailbox.