System Administration Guide: Network Services

ProcedureHow to Create a Keyed Map File

To create a keyed map file, follow these instructions.

  1. Become superuser or assume an equivalent role.

    Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services. To configure a role with the Primary Administrator profile, see Chapter 2, Working With the Solaris Management Console (Tasks), in System Administration Guide: Basic Administration.

  2. Create an input file.

    Entries can have the following syntax.


    [email protected]   [email protected]
    [email protected]    error:nouser No such user here
    @olddomain.com          %1@newdomain.com
    
    [email protected]

    Use the user name that was previously assigned with the domain that is newly assigned.

    [email protected]

    Use the address that is newly assigned.

    [email protected]

    Use the user name that was previously assigned with the domain that was previously assigned.

    olddomain.com

    Use the domain that was previously assigned.

    newdomain.com

    Use the domain that is newly assigned.

    The first entry redirects mail to a new alias. The next entry creates a message when an incorrect alias is used. The last entry redirects all incoming mail from olddomain to newdomain.

  3. Create the database file.


    # /usr/sbin/makemap maptype newmap < newmap
    
    maptype

    Select a database type, such as dbm, btree, or hash.

    newmap

    Use the name of the input file and the first part of the name of the database file. If the dbm database type is selected, then the database files are created by using a .pag and a .dir suffix. For the other two database types, the file name is followed by .db.