Полезная информация

sendmail Desktop Reference

sendmail Desktop ReferenceSearch this book
Previous: 4.3 MAILER DeclarationsChapter 4
Configuring with m4
Next: 4.5 Mailer Tables
 

4.4 Virtual User Tables

When using FEATURE(virtusertable), sendmail will do translation based on the entire domain name when the address is first read. This is similar, but not identical, to aliasing. It is commonly used to host multiple domains with different (and possibly even overlapping) users on one machine using MX records. The format of the input file (e.g., /etc/virtusertable) is:

[virtuser]@virtdomain   address

For example, an input file might read:

info@foo.com    foo-info
info@bar.com    bar-info
john@foo.com    jdoe
jane@foo.com    jroe@elsewhere.com
@bar.com        mary

The first two entries translate info@foo.com and info@bar.com into different names, which may be user names or aliases. The third and fourth entries alias users to other names. The fifth entry says that anything@bar.com that wasn't otherwise recognized should go to mary.

You build the database from the input file using the makemap(1) program:

% makemap hash /etc/virtusertable < /etc/virtusertable

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

FEATURE(virtusertable, hash /etc/virtusertable)


Previous: 4.3 MAILER Declarationssendmail Desktop ReferenceNext: 4.5 Mailer Tables
4.3 MAILER Declarations 4.5 Mailer Tables