Unix Network Admin   «Prev  Next»
-
Lesson 6Compiling sendmail
Objective Explain how to compile sendmail.

Compiling Sendmail

Linux and Solaris are distributed with current versions of sendmail already installed. However, you may need to upgrade your version of sendmail to keep up with security fixes and improvements.
To compile sendmail, you download the appropriate archive file from proofpoint.com and unpack the archive using uncompress or gunzip compression utilities, together with tar. Versions 8.9 and higher of sendmail include a script file named Build. You execute this file by using the sh command to compile a new version of sendmail. Build automatically detects your operating system type, then builds sendmail accordingly. Once you have compiled the program, you must create a new sendmail.cf file, then kill any current running sendmail version and start the new one. Then you can troubleshoot the new installation.

Compile issues

The sendmail program may have specific problems with some UNIX flavors. For example, if your system uses gcc 2.4.x or 2.5.x, you cannot use the –O (optimization) argument. If you have trouble compiling sendmail, consult the sendmail Web site or the sendmail newsgroup. See the Internet Resources section of the course Resources page for these links.

sendmail file locations

After compiling, sendmail traditionally stores its configuration files in the /etc directory. These include the main configuration file sendmail.cf, along with supporting configuration information such as the aliases file.
The /etc/mail directory contains other support files, including files controlling access to the sendmail process, such as the ip_allow, ip_deny, and relay_allow files.
The precise locations of sendmail configuration files can vary depending on the UNIX version. For example, HP-UX and Solaris put their alias file in the /etc/mail/aliases directory, whereas Irix uses /etc/aliases.
Beginning with sendmail 8.9, sendmail configuration is being standardized and all UNIX flavors should use /etc/mail as the directory for all sendmail configuration files. All subsequent iterations of sendmail will use this location by default.

sendmail and BIND (DNS)

You must have properly configured DNS to run sendmail. If you plan to receive email at your site, you must make modifications to your DNS zone files to enable remote SMTP servers to find you. We will discuss the interaction between DNS and SMTP in a later lesson.