Mailer tables are a simple way of directing messages to different Mail Delivery Agents (MDAs) on the basis of host or domain names. For example, consider this input file (e.g., /etc/mailertable):
remote.foo.com uucp-uudom:home .skunkworks.foo.com relay:secret.foo.com
Here the first line says that anything addressed to firstname.lastname@example.org should be sent using the uucp-uudom deilvery agent to the host named home. The second line says that any message addressed to any host within the domain .skunkworks.foo.com should be sent using the relay delivery agent to the host secret.foo.com.
You can build the database from the input file using the %makemap(1) program:
You declare the database for use with your .mc file, like this:
FEATURE(mailertable, hash /etc/mailertable)