Installing and Administering Internet Services

196 Chapter4
Installing and Administering sendmail
Configuring sendmail to Reject Unsolicited Mail
Specifying Local Hosts that can Use Your Machine as a Host
You can identify hosts for which you are willing to receive and forward
mail messages either by IP address or hostname.
NOTE You cannot specify domain names here.
Enter the IP address of the local hosts for which you are willing to act
as a relay host in the file /etc/Mail/LocalIP.
199.28.9.20
199.32.7.15
Mail messages sent from or to the local host whose IP address you
enter in the file will be accepted.
Enter the hostname of the local host for which you will act as a relay
host for in the file /etc/mail/LocalNames.
For example, if you enter the following, mail sent to or from these
hosts will be sent accepted for relaying through the mail server.
bobcat
tulip.india.hp.com
rose.hp.com
Accepting and Delivering Messages for External Hosts or
Domains
You can allowexternal mail messages to be routed through your machine
or you can set it so external messages are not relayed through your
machine. By default, external messages are not allowed to pass through
your machine.
Enter the external domain you will accept and deliver messages for in
the /etc/Mail/RelayTo file.
For example, enter hp.com to relay messages for the domain, hp.com.
By specifying hp.com, if a user from aol.com tries to send a mail
message to a user in another external domain like hotmail.com,
through your mail hub, then the hub will reject the mail message.