Macros to Allow Relaying
Hosts and domains to which mail can be relayed are listed either in a special sendmail class, or in the access database. You add hosts and domains to the special class with either the RELAY_DOMAIN mc macro, or the RELAY_DOMAIN_FILE mc macro.
The RELAY_DOMAIN mc macro
A special class (currently
$=R) holds as its list of values host and
domain names to which
sendmail should allow mail to
be relayed. Relaying is discussed in general in
the sections that follow.
You add domain names to this class like this:
RELAY_DOMAIN(`list of hosts and domains')
Here, the list is one or more hosts or domains separated from each other by spaces:
If you find it more convenient to list them on separate lines, you can do so like this:
The list can be host or domain names, or IP
addresses, or network numbers. IPv6 addresses can
be specified by prefixing each with the literal
host.another.domain ← a hostname your.domain ← a domain name 123.45 ← a network (leftmost numbers) 220.127.116.11 ← a host IP address IPv6:2002:c0a8:02c7 ← an IPv6 network IPv6:2002:c0a8:51d2::23f4 ← an IPv6 host address
The RELAY_DOMAIN_FILE mc macro
You can also maintain a list of hosts, domains, and addresses that can be relayed to in an external file. That file is declared with the following macro:
define(confCR_FILE, `path') ← deprecated RELAY_DOMAIN_FILE(`path ...