Previous | Next | Contents | Index |
PMDF always reads in all the aliases from the alias
file
and stores them internally in a hash table. This scheme is adequate for
most applications where fewer than 500 or so aliases are needed.
However, some systems may want to establish aliases for a majority of
their users. For example, a user smith
whose real name is
Cathy Smith, might want to have Cathy_Smith
,
Cathy.Smith
, and Smith
as aliases for her
account. Setting up such aliases for each member of a large user
population may lead to an excessively large alias
file
that consumes far too much memory.
PMDF solves this problem by providing an optional facility for storing
large numbers of aliases in an ancillary indexed data file. Whenever
the alias file is used PMDF also checks for the existence of the PMDF
alias
database.5 If the alias
database exists, it is
opened and consulted once for each address on the local channel. The
alias database must be world readable.
By default, the mere presence of the alias database is enough to
activate this database facility in PMDF; it is not necessary to rebuild
or reconfigure PMDF to include it.
Use of the alias
database can be disabled with the PMDF
option USE_ALIAS_DATABASE
. This option can also be used to
tell PMDF that the alias database is required, and if it isn't there,
to return a temporary error (by specifying USE_ALIAS_DATABASE=2).
3.1.2.1 Using Both the Alias File and the Alias Database
The alias
database is a supplement to the alias
file; it is not a replacement for the
alias
file. If the alias database exists, PMDF uses
both the alias
file and the alias
database.
The alias database is consulted once each time the regular alias file is consulted. However, the alias database is checked before the regular alias file is used. In effect, the database acts as a sort of address rewriter that is invoked prior to using the regular alias file. Although duplicate entries are allowed in the database, it is undefined as to which of the duplicate entries will be returned when the database is accessed. Database entries are case insensitive.
The fact that limited recursion is allowed in the alias file makes the complete translation mechanism rather complex. For example, suppose that the alias file contains the entries,
A: C,J B: D,K D: G,H E: I |
alias
database contains the entries,
D: E C: B F: D |
Now suppose the address A@local-host
was
presented to PMDF. First A would be looked up in the database --- not
found. Then A would be translated into C and J by the alias file. C
would in turn be translated into B by the database while J would remain
unchanged. B would then be translated into D and K by the alias file. D
would then be translated into E by the database while K would remain
unchanged. Finally, E would be translated into I by the alias file, and
since I does not appear in the database the process would terminate.
The final result is that A translates into the list I, J, K.
The easiest way to look at the translation process is to simply follow it step-by-step as illustrated below.
Initial Data Data Data Data look up base File base File base File base Result ------- ---- ---- ---- ---- ---- ---- ---- ------ A A C B D E I I I K K . . K J J . . . . J B B D E I I . . I K K . . . . K C B D E I I . . I K K . . . . K D E I I . . . . I E E I I . . . . I F D G G . . . . G H H . . . . H |
Such complex use of the aliases facility is not encouraged and is presented for illustrative purposes only.
In particular, for most normal goals any particular entry should appear in either the alias file or the alias
database, not in both!
|
3.1.2.2 Format of the Alias Database
The alias
database has the same format as the optional
domain database file described in Section 2.2.9. This means that
aliases in the database are limited to 32 characters in length and can
translate to a string containing at most 80 characters unless a
"long" database is used. See Section 2.2.9 for information on
long databases.
Length restrictions aside, alias
database entries are
handled in the same way as alias
file entries and can be
used in exactly the same way. Both multiple addresses and mailing list
references are allowed. Both the alias
file and
alias
database must be world readable.
The PMDF alias
database is created from an input text file
(not from the alias
file---from a
different input text file) using the PMDF CRDB
(OpenVMS) or pmdf crdb
(UNIX or NT) utility, described in
Chapter 31 and Chapter 32. The format of entries in the input file for CRDB or
crdb
should be:
alias1 alias-value1 alias2 alias-value2 . . . . . . |
Note that unlike the aliases file, the entries in the alias database source text file normally do not use a colon to separate the alias from its value.
On OpenVMS systems, the alias database should be generated with the commands:
$ PMDF CRDB input-file-spec PMDF_TABLE:aliases.tmp $ RENAME PMDF_TABLE:aliases.tmp PMDF_ALIAS_DATABASE |
# pmdf crdb input-file-spec PMDF_ALIAS_DATABASE |
C:\ pmdf crdb input-file-spec PMDF_ALIAS_DATABASE |
Alternatively, a source file using colons, (that is, of the same format as the alias file), e.g.,
alias1: alias-value1 alias2: alias-value2 . . . . . . |
/STRIP_COLONS
(OpenVMS) or
-strip_colons
(UNIX or NT) qualifier is used when building
the database; e.g., on OpenVMS:
$ PMDF CRDB/STRIP_COLONS input-file-spec PMDF_TABLE:aliases.tmp $ RENAME PMDF_TABLE:aliases.tmp PMDF_ALIAS_DATABASE |
# pmdf crdb -strip_colons input-file-spec PMDF_ALIAS_DATABASE |
C:\ pmdf crdb -strip_colons input-file-spec PMDF_ALIAS_DATABASE |
5 On OpenVMS systems, the logical
|
Previous | Next | Contents | Index |