Name

FEATURE(masquerade_entire_domain)

Synopsis

Ordinarily, masquerading transforms any host from a list of hosts in the class $=w ($=w) into the host defined by MASQUERADE_AS. If domains are also masqueraded with MASQUERADE_DOMAIN, they too are transformed. For example, consider these declarations:

MASQUERADE_AS(`our.domain')
MASQUERADE_DOMAIN(`her.domain')

The first line causes any host part of an address contained in the class $=w to be transformed into our.domain. The second line transforms the domain part of her.domain into our.domain.

The key point here is that the domain part her.domain will be transformed, whereas hosts under that domain will not be transformed:

george@her.domain     becomes     george@our.domain
george@host.her.domain      remains     george@host.her.domain

If you wish MASQUERADE_DOMAIN to transform all the hosts under the declared domain, you can use the masquerade_entire_domain feature:

MASQUERADE_AS(`our.domain')
MASQUERADE_DOMAIN(`her.domain')
FEATURE(`masquerade_entire_domain')

This feature extends masquerading of her.domain to include all the hosts under that domain:

george@her.domain     becomes     george@our.domain
george@host.her.domain      becomes     george@our.domain
george@host.sub.her.domain  becomes     george@our.domain

Note that you can masquerade only domains that are under your direct jurisdiction and control. Also note that domain masquerading is intended for actual domains. Virtual domains are better handled with the genericstable feature (FEATURE(genericstable) ...

Get Sendmail, 3rd 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.