zDBASES.CONF(5zm)

NAME
TBW: dbases.conf - Centralized database setup for the ZMailer's router(8zm).

SYNOPSIS
The file is usually located into ZMailer's MAILSHARE/db/ directory, and has name: dbases.conf

This file is intended to be processed with command:
    zmailer newdb

DESCRIPTION

Some ideas about functionality can be had from this sample file:

#|
#|  This configuration file is used to translate a semi-vague idea
#|  about what database sources (in what forms) are mapped together
#|  under which lookup names, and what format they are, etc..
#|
#|  This is used by  'zmailer newdb'  command to generate all databases
#|  described here, and to produce relevant  .zmsh  scripts for the
#|  router to use things.  The  'zmailer newdb' invocation does not mandate
#|  router restart in case the database definitions have not changed,
#|  mere database recompilation is handled without restarts.
#|  (reverse is true:  If definitions are added/modified/removed, the router
#|                     MUST be restarted)
#|
#|Fields:
#|     relation-name
#|         dbtype(,subtype)
#|              dbpriv control data (or "-")
#|                  newdb_compile_options (-a for aliases! -r = read-only)
#|                     dbfile (or "-")
#|                         dbflags (or "-") ... (until end of line)
#|
#| The 'relation-name' are a set of magic tokens (listed below), which
#| system scripts support.  There can be any number of databases for
#| any given 'relation-name'.  Those are scanned in order, first match
#| wins.  (E.g. you can have multiple 'aliases' relations.)
#|
#| The  dbtype  can be "magic" '$DBTYPE', or any other valid database
#| type for the Router.  Somewhat magic treatment (newdb runs) are
#| done when the dbtype is any of: *DBTYPE/dbm/gdbm/ndbm/btree
#|
#| The  newdb_compile_options  are used when recompiling the database
#| with 'newdb' command.
#|
#| The "dbfile" need not be located underneath of $MAILVAR, as long as
#| it is in system local filesystem (for performance reasons.)  E.g.
#| one can place one of e.g. aliases files to some persons directory.
#| Implicite assumption is, that the 'newdb' produces the database
#| with same name, as what the "dbfile" fields says -- appending only
#| database type specific magic tail(s).
#|
#| At  dbflags  (until end of the line), characters ':' and '%' have special
#| meaning as their existence generates lookup routines which pass user's
#| optional parameters.  See documentation about 'dblookup'.
#|
#|Example:
#|
#|Security sensitive ones ("dbpriv" must be defined!)
#| aliases         $DBTYPE  0:0:644    -la $MAILVAR/db/aliases        -lm
#| aliases         $DBTYPE  root:0:644 -la $MAILVAR/db/aliases-2      -lm
#| fqdnaliases     $DBTYPE  root:0:644 -la $MAILVAR/db/fqdnaliases    -lm
#| fqdnroutes      $DBTYPE  root:0:644 -la $MAILVAR/db/fqdnroutes     -lm%:
#| userdb          $DBTYPE  root:0:644 -l  $MAILVAR/db/userdb         -lm
#|
#|Security insensitive ones ("dbpriv" need not be defined!)
#| fqdnaliasesldap ldap   -  -   $MAILVAR/db/fqdnalias.ldap -lm -e 2000 -s 9000
#| fullnamemap     $DBTYPE  -    -l  $MAILVAR/db/fullnames    -lm
#| mboxmap         $DBTYPE  -    -l  $MAILSHARE/db/mboxmap    -lm
#| expired         $DBTYPE  -    -l  $MAILVAR/db/expiredaccts -lm
#| iproutesdb      $DBTYPE  -    -l  $MAILVAR/db/iproutes     -lmd longestmatch
#| routesdb        $DBTYPE  -    -l  $MAILVAR/db/routes       -lm%:d pathalias
#| thishost        $DBTYPE  -    -l  $MAILVAR/db/localnames   -lm%d  pathalias
#| thishost        unordered -   -   $MAILVAR/db/localnames   -ld    pathalias
#| thishost        bind,mxlocal - -  -                        -ld    pathalias
#| otherservers    unordered -   -   $MAILVAR/db/otherservers -lmd   pathalias
#| newsgroup       $DBTYPE  -    -l  $MAILVAR/db/active       -lm
aliases         $DBTYPE 0:0:644    -la $MAILVAR/db/aliases      -lm
fqdnaliases     $DBTYPE root:0:644 -la $MAILVAR/db/fqdnaliases  -lm%
userdb          $DBTYPE root:0:644 -l  $MAILVAR/db/userdb       -lm
routesdb        $DBTYPE -   -l  $MAILVAR/db/routes      -lm%:d pathalias
thishost        $DBTYPE -   -l  $MAILVAR/db/localnames  -lm%d  pathalias
#| =================================================================
#|    Set of boilerplate tail-keepers, these lookups fail ALWAYS.
#| These are given because if user ever removes any of the relations
#| mentioned above, the generated "RELATIONNAME.zmsh" script won't
#| just magically disappear!
#| =================================================================
aliases         NONE - - - -
expired         NONE - - - -
fqdnaliasesldap NONE - - - -
fqdnaliases     NONE - - - -
fqdnroutes      NONE - - - -
fullnamemap     NONE - - - -
iproutesdb      NONE - - - -
newsgroup       NONE - - - -
otherservers    NONE - - - -
routesdb        NONE - - - -
thishost        NONE - - - -
userdb          NONE - - - -
#| NOTE:  mboxmap  MUST NOT exist at all if its secondary-effects
#|        are to be avoided!

HISTORY

ENVIRONMENT VARIABLES

ZCONFIG
    This environment variable is expected to be inherited from the scheduler(8zm), and it tells where scheduler's idea of ZENV-variables are located at.

Z-ENVIRONMENT VARIABLES

TBW: many variables!

FILES

/usr/local/etc/zmailer/zmailer.conf | (ZCONFIG)
/var/spool/postoffice | (POSTOFFICE)

SEE ALSO

router(8zm), scheduler(8zm), zmailer.conf(5zm).

AUTHOR
This software authored and copyright by:
    Matti Aarnio <mea@nic.funet.fi>