The praliases Program

The praliases program allows you to view the contents of the aliases database after it is built. The advantage of using praliases (rather than makemap -u) is that praliases reads the sendmail configuration file to find the location and type of the aliases database. As a bonus, praliases prints the contents of all aliases databases. For example, consider a part of your mc configuration file that looks like this:

define(`ALIAS_FILE', `hash:/etc/mail/aliases/users,btree:/etc/mail/aliases/clients')

Here, the /etc/mail/aliases/users.db file will be created by newaliases as a hash-type database, and the file /etc/mail/aliases/clients.db will be created as a btree-type database. If you ran praliases on this setup, it would first print all the aliases in the first file, followed by all the aliases in the second file, correctly detecting the type for each.

The praliases program reads the sendmail.cf file to find the location and types of aliases files. A command-line switch allows you to point to a different configuration file. Another allows you to specify a particular aliases database file. Those switches are outlined in Table 10-7, and explained in the sections that follow.

Table 10-7. praliases command-line switches

Switch

§

Description

-C

-C on page 378

Use an alternative configuration file.

-f

-f on page 378

Specify another name for the aliases file.

The output produced by praliases is different from that produced by makemap -u. The praliases program lists ...

Get sendmail, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.