Next: , Previous: , Up: MeTA1   [Contents][Index]


A.2 Configure aliases

We are going to store aliases in the table ‘aliases’ which has the following structure:

CREATE TABLE userdb (
  user varchar(32) NOT NULL default '',
  alias text
  PRIMARY KEY (user)
);

It will be served by ‘alias’ database, defined as follows:

database alias mysql \
    defaultdb \
    query="SELECT alias FROM aliases WHERE user='$key'" \
    positive-reply="OK $alias"

It differs from the ‘userdb’ database only in that it returns a result section with its positive reply.