[ Pobierz całość w formacie PDF ]
.The file should be owned by root and have permissions set to 553.The /etc/sendmail.cf file is the configuration file used by sendmail.This file is sometimes installed as /usr/lib/sendmail.cf.The /usr/bin/newaliases file is a symbolic link to the sendmail binary.Create it with the command ln -s /usr/sbin/sendmail /usr/bin/newaliases if the link isn't already installed.The /var/spool/mqueue directory is used to hold the mail queue.Create this directory with root as the owner and permissions set to 700.Some installations may prefer the directory /usr/spool/mqueue.The /etc/aliases file contains system aliases.This file should include the aliases provided in the lib/aliases file under the sendmail distribution directory.In order to start sendmail automatically when your Linux system boots, modify the /etc/rc files to include these lines (if they don't already exist):if [ -f /usr/sbin/sendmail -a -f /etc/sendmail.cf ]; then(cd /var/spool/mqueue; rm -f [lnx]f*)/usr/sbin/sendmail -bd -q30m &echo -n ' sendmail' >/dev/consolefiThe directory paths should reflect the paths used on your system, of course.The rm command used in this script removes any lock files that are left over from the system after the last shutdown.Using the sendmail TemplatesThe Slackware Linux distribution that accompanies this book, and most other releases of Linux that provide sendmail version 8, have a few templates provided that set most of the needed parameters.The templates on the Linux CD-ROM accompanying this book are as follows:The cf/linux.smtp.mc template is for systems directly connected to the Internet (the default configuration).The cf/linux.nodns-smtp.mc template is similar to the above configuration but it's for systems with no nameserver (such as most small LANs).The cf/linux.uucp.mc template is for for UUCP-based connections.If you choose to use one of the template files, examine it carefully to make sure the directories and system names are correct for your system.Make any changes directly into the file.To install one of these configuration files (or any other that you may find that suits your needs), issue the commandm4 config_file.mc > /etc/sendmail.cfwhere config_file.mc is the configuration file you want to install.This command executes the macro language processor and copies the resulting file over the standard sendmail configuration file.SummaryThis chapter examined the configuration process for sendmail+IDA, the most common form of sendmail used with Linux.If you plan on using smail instead, read Chapter 36
[ Pobierz całość w formacie PDF ]