A.4 MeTA1 configuration

Finally we need to inform MeTA1 about new maps. This is done in the file ‘/etc/meta1/meta1.conf’, section ‘smar’.

First, the ‘userdb’ map:

 
  map password { type = passwd; }
  map userdb {
        type = socket;
        path = "/var/spool/meta1/smap/userdb";
        mapname = userdb;
  }
  map locusr {
        type = sequence;
        maps = { password, userdb };
  }

  local_user_map {
       name = "locusr";
       flags = { localpart, local_domains };
  }

As a result, MeTA1 will look up users in the system database first, and, if that fails, in the SQL database.

Next, the ‘aliasdb’ map:

 
  map lum {
        type = socket;
        path = "/var/spool/meta1/smap/userdb";
        mapname = aliases;
  }
  map stdal { file = "aliases.db"; type = hash; }
  map aliasmap { type = sequence; maps = { lum, stdal }; }
  aliases {
        name = aliasmap;
        flags = { localpart, local_domains };
  }

As for ‘userdb’, this map declaration also uses two different databases. First, it asks smapd to find the alias. If it returns a negative reply, the map falls back to the default ‘aliases.db’ database.