Previous | Contents | Index |
The following sections provide full descriptions of all pmdf db
commands.
6.4.5.1 add
Syntax: add alias-name alias-value
[attributes[,...]]
With the add command an alias and its expansion value may be added to the database currently opened. If the alias expansion value contains any spaces, commas, or upper case characters which should not be converted to lower case, then the expansion value must be enclosed in double quotes. Any double quotes in the expansion value must be "doubled" (i.e., entered as two consecutive double quotes). Examples of these two cases are:
db> add staff "bob@example.com,sue@example.com,tom@example.com" db> add jo """John Owen""@example.com" db> add ldap-all <"""ldap:///dc=example,dc=edu?mail?sub?(cn=*)""" |
As another example, consider entering the alias JD with the simple expansion value jd573@hostc.example.com:
db> add JD jd573@hostc.example.com [Entry added to database] db> show JD Key Value ---------- ----------------------------- jd jd573@vaxc.example.com [1 entry shown] db> |
pmdf db
will always translate the name of an alias to lower case; PMDF does not
do case sensitive alias matching. To prevent the alias translation
value from being converted to lower case, enclose it in double quotes;
e.g.,
db> modify JD "JD573@HOSTC.EXAMPLE.COM" [1 entry modified] db> show JD Key Value ---------- ----------------------------- jd JD573@HOSTC.EXAMPLE.COM [1 entry shown] db> |
mail_address
Treat this alias as a mail address; i.e., set the mail address attribute flag for this alias. Default when in normal mode. Not set when anoverride on
command has been issued.non_mail_address
Do not treat this alias as a mail address; that is, clear the mail address attribute flag for this alias.expand
This attribute forces the expansion of the alias into its component addresses. All of the component addresses will be listed in the message header as the alias expands.no_expand
This attribute inhibits the expansion of the alias into its component addresses. The alias itself will appear in the header in some form; see the description of the public and private attributes above for details on the forms the alias can take.pass_receipts
This attribute enables the passage of requests for delivery and read receipts through to all recipients as the alias is expanded. Note that allowing the passage of such a request to a large distribution list may result in a lot of return mail.block_receipts
This attribute disables the passage of requests for delivery and read receipts through to all recipients as the alias is expanded. Requests for such receipts are honored at the time the alias expands; in effect the alias is treated as the message destination.
When an alias is entered with the add command at the db>
prompt, the alias will automatically be given the mail address attribute unless an override on
command has been previously issued or the non_mail_address
keyword is specified with the add
command.
6.4.5.2 close
Syntax: close
The close
command closes the currently open alias database. Use the open
command to open a different database. pmdf db
will automatically close any open database when the exit
or quit
commands are issued.
6.4.5.3 copy
Syntax: copy from-alias-name to-alias-name
The copy
command creates a new alias with the name to-alias-name and associates to it the expansion value of the alias with the name from-alias-name. A subsequent change to the "from" alias will not affect the "to" alias. Any attributes associated with the "from" alias will be copied to the "to" alias regardless of whether or not an override on
command has been issued previously.
db> add postmaster "root@thor.example.com" [Entry added to database] db> copy postmaster postmast [1 entry copied] db> show post* Key Value ---------- ----------------------------- postmast system@thor.example.com postmaster system@thor.example.com [2 entries shown] db> |
6.4.5.4 exit
Syntax: exit-program
The exit and quit commands are identical and each causes pmdf db
to close any open database and then exit.
6.4.5.5 help
Syntax: help [topic]
Obtain help on a topic.
6.4.5.6 modify
Syntax: modify alias-name new-alias-value
The modify
command is used to replace the expansion value of an alias with a new
expansion value.
db> add postmaster "root@thor.example.com" [Entry added to database] db> show postmaster Key Value ---------- ----------------------------- postmaster root@thor.example.com [1 entry shown] db> modify postmaster "ariel@example.com" db> show postmaster Key Value ---------- ----------------------------- postmaster ariel@example.com [1 entry shown] db> |
Wild cards may be used when specifying the alias name in order to modify one or more aliases simultaneously.
6.4.5.7 open
Syntax: open database-name [huge|long|short]
The open
command opens an alias database after first closing any currently opened database. If the database to be opened already exists, then pmdf db
will automatically determine whether or not the database is a
"huge" (stores 80/1024 character long alias names/values), or
"long" (stores 80/132 character long alias names/values) or
"short" (stores 32/80 character long alias names/values). If
the database does not already exist, then it will be created.
When pmdf db
is first invoked, your own personal alias database is automatically
opened, or created if it doesn't exist.
6.4.5.8 override
Syntax: override on|off
The override
command is useful when looking at or modifying databases other than an alias database. Ordinarily the database manipulation commands, add
, copy
, modify
, rename
, remove
, set
, and show
will only operate on aliases with the mail_address
attribute. When the command override on
has been issued, these commands may be used to manipulate any entry in
the database regardless of its attributes (or lack thereof).
The override off
command negates the override on
command.
6.4.5.9 quit
Syntax: quit
The exit
and quit
commands are identical and each causes pmdf db
to close any open database and then exit.
6.4.5.10 remove
Syntax: remove alias-name
With the remove
command, one or more aliases may be removed from the database. Wild cards may be used when specifying aliases to be removed. For instance, to remove all aliases from a database, issue the command remove*
.
6.4.5.11 rename
Syntax: rename old-alias-name new-alias-name
The rename
command is used to rename an alias without altering its expansion value:
db> add postmaster "root@thor.example.com" [Entry added to database] db> show postmaster Key Value ---------- ----------------------------- postmaster root@thor.example.com [1 entry shown] db> rename postmaster post [1 entry renamed] db> show post Key Value ---------- ----------------------------- post root@thor.example.com [1 entry shown] db> |
6.4.5.12 run
Syntax: run file-spec
The run
command may be used to execute a file of pmdf db
commands.
6.4.5.13 set
Syntax: set alias-name attributes[,...]
The set
command may be used to grant or remove attributes from aliases. The alias name specification may include wild cards. The allowable attribute names are listed in the add
command description described in Section 6.4.5.1.
6.4.5.14 show
Syntax: show [alias-name [attributes]]
The show
command is used to list the contents of a database. The optional attributes
keyword, when supplied, causes the attributes associated with each
alias to also be displayed:
db> add postmaster "root@thor.example.com" [Entry added to database] db> show postmaster attributes Key Value ---------- ----------------------------- postmaster root@thor.example.com Attributes: private,expand,block_receipts,mail_address [1 entries shown] db> |
mail_address
attribute, issue the command show
; to see absolutely all entries, first issue the command override on
followed by the command show
6.4.5.15 wildcards
Syntax: wildcards ignore|interpret
By default, the characters *
and %
in alias names are interpreted as wildcards: an asterisk, *
, will match zero or more characters while each percent sign, %
, will match precisely one character. The command wildcards ignore
will cause pmdf db
to not interpret asterisks or percent signs as wildcards; the command wildcards interpret
will resume interpretation of wildcards.
6.4.5.16 write
Syntax: write file-name [alias|pine]
The write
command is used to create a command file which, when fed back into pmdf db
with the run
command, will recreate the entire database. If the alias
keyword is specified, then a PMDF alias file (using PMDF's alias file format) will instead be produced. If the pine
keyword is specified, then a pine addressbook is written.
For instance, the following commands will create a database named db2
which duplicates the database db1
:
db> open db1 db> write makedb1 db> open db2 [creating database] db> run makedb1 db> |
db1
. The file makedb1
created with the write
command is an ordinary text file which may be edited with any text
editor.
Note that this is not an efficient way to duplicate a database --- a shell command such as the cp
command will work much more quickly. The write
command is intended as a means of creating a textual representation of
a database which can be edited as a text file and later turned back
into a database.
Previous | Next | Contents | Index |