imta renamedb

The imta renamedb command renames an IMTA database. Since the IMTA may optionally reference several "live" databases, that is, databases whose presence triggers their use by the IMTA, it is important, first, to ensure that the IMTA does not see such a database while it is in a mixed state, and second, to minimize any period of time during which the database is inaccessible. The imta crdb command locks the database it is creating to avoid having it accessed in a mixed state.

It is recommended that the IMTA databases be created or updated in a two-step process:

  1. Create or update a temporary database
  2. Rename the temporary database with the "live" name using the imta renamedb command.

The imta renamedb utility, which must delete any old database files and rename the new database files, locks the database during the renaming process to avoid presenting the database in a mixed state. In this way the database is never accessible while it is in a mixed state, yet any window of time during which the database is inaccessible is minimized. Renaming is generally quicker than database generation.


Syntax

 
imta renamedb old-database-spec new-database-spec
 

The parameters for this command are:

old-database-spec  

The name of the database that is being renamed.  

new-database-spec  

The new name of the database. This may either be an actual pathname, or one of the special names such as IMTA_ALIAS_DATABASE, IMTA_REVERSE_DATABASE, IMTA_GENERAL_DATABASE, or IMTA_DOMAIN_DATABASE, listed in the IMTA tailor file and pointing to actual pathnames.  


Example

The following command renames the database tmpdb to be the actual IMTA alias database (usually /var/opt/SUNWmail/imta/db/aliasesdb). Type:

 
% imta renamedb tmpdb IMTA_ALIAS_DATABASE
 




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