sendmail Desktop Reference

sendmail Desktop ReferenceSearch this book
Previous: 4.4 Virtual User TablesChapter 4
Configuring with m4
Next: 4.6 Hints
 

4.5 Mailer Tables

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 user@remote.foo.com 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:

% makemap hash /etc/mailertable < /etc/mailertable

You declare the database for use with your .mc file, like this:

FEATURE(mailertable, hash /etc/mailertable)


Previous: 4.4 Virtual User Tablessendmail Desktop ReferenceNext: 4.6 Hints
4.4 Virtual User Tables 4.6 Hints