Installing and Administering Internet Services
160 Chapter4
Installing and Administering sendmail
Installing sendmail
sendmail startup script.
2. In the /etc/rc.config.d/mailservs file, use a text editor to set the
SENDMAIL_SERVER_NAME variable to the host name or IP address of
the mail server you will use (the machine that will run the sendmail
daemon).
3. In the /etc/rc.config.d/nfsconf file, use a text editor to set the
NFS_CLIENT variable to 1.
4. Use a text editor to add the following line to the /etc/fstab file:
servername
:/var/mail /var/mail nfs 0 0
where
servername
is the name configured in the
SENDMAIL_SERVER_NAME variable in /etc/rc.config.d/mailservs.
If the /etc/fstab file does not exist, you will have to create it.
5. Issue the following command to run the sendmail startup script:
/sbin/init.d/sendmail start
6. Issue the following command to run the NFS startup script:
/sbin/init.d/nfs.client start
The sendmail startup script assumes that this system will use the host
specified by the SENDMAIL_SERVER_NAME variable as the mail hub. The
script also assumes that mail sent from this system should appear to be
from the host specified by the SENDMAIL_SERVER_NAME variable (this
feature may previously have been known as “site hiding”). The script
therefore modifies the macros DM (for “masquerade”) and DH (for “mail
hub”) in the system’s /etc/mail/sendmail.cf file to use the host
specified by the SENDMAIL_SERVER_NAME variable. Note that if the DM and
DH macros have previously been defined, the startup script does not
modify them.
As mentioned earlier, the client system now forwards local mail to the
mail server and forwards other mail directly to remote systems. To
configure the client system to relay all mail to the mail server for
delivery, see “Modifying the Default sendmail Configuration File” on
page 185.
The NFS startup script NFS-mounts the /var/mail directory from the
mail server to your system. For more information on NFS, see Installing
and Administering NFS Services.