Appendix E. A sendmail Reference

This appendix provides details of the syntax of the sendmail command, of the file, and of the m4 macros that can be used to build that file. It describes where to obtain the latest source code for sendmail and how to compile it. This appendix is a reference, not a tutorial. Refer to Chapter 10 for a tutorial on sendmail configuration.

We start the appendix with information on locating, downloading, and compiling the latest version of sendmail.

Compiling sendmail

The source code for sendmail is available via anonymous FTP from, where it is stored in the pub/sendmail directory. sendmail is updated constantly. The following examples are based on sendmail 8.11.3. Remember that things will change for future releases. Always read the README files and installation documents that come with new software before beginning an installation.

To compile the sendmail program, download the compressed tar file as a binary file, and then uncompress and extract it with the tar command, shown below:

$ ftp
Connected to
220 FTP server ready.
Name ( anonymous
331 Guest login ok, send your e-mail address as password.
230 Guest login ok, access restrictions apply.
Remote system type is UNIX.
Using binary mode to transfer files.   
ftp> cd pub/sendmail
ftp> get sendmail.8.11.3.tar.gz local: sendmail.8.11.3.tar.gz remote: sendmail.8.11.3.tar.gz 200 PORT command successful. ...

Get TCP/IP Network Administration, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.