The latest source for sendmail is always available at http://www.sendmail.org but if you're using Red Hat Linux why not work with the source RPM? The beautiful part of working this way is that any changes you make can easily be moved to other platforms via FTP. For those of you using older versions of Red Hat Linux but would like to upgrade to a newer version of sendmail, this section is for you.
For everyone's benefit, we're going to install a useful patch to sendmail in this section.
The source RPM for sendmail is on the second CD-ROM and we will need it for this. Mount the CD-ROM. Here is a step by step series of commands which shows the process:
[root@boss /root]# mount /mnt/cdrom [root@boss /root]# cd /mnt/cdrom [root@boss cdrom]# ls COPYING README SRPMS TRANS.TBL [root@boss cdrom]# cd SRPMS [root@boss SRPMS]# ls sendmail* sendmail-8.9.3-15.src.rpm [root@boss SRPMS]# rpm -i sendmail-8.9.3-15.src.rpm [root@boss SRPMS]# cd /usr/src/redhat/SPECS [root@boss SPECS]# ls sendmail.spec [root@boss SPECS]# ls /usr/src/redhat/SOURCES/ aliases sendmail-8.9.3-cf.patch sendmail-redhat.mc check.tar sendmail-8.9.3-db1.patch sendmail.8.9.3.tar.gz sendmail-8.7.1-makemapman.patch sendmail-8.9.3-etc-mail-Makefile sendmail.init sendmail-8.7.1-smrsh.patch sendmail-8.9.3-redhat.patch sendmail.sysconfig sendmail-8.8.7-rmail.patch sendmail-8.9.3-smrsh.patch
The installation of the src.rpm did install some things. If you're new to all of this you may have installed a src.rpm before and expected something entirely different. If that has happened to you, you should now have a much better idea where the src.rpm installed its files. We need to add a patch file to this directory. Here's where to get it:
The author did this quickly with the following commands:
[root@boss SPECS]# cd /usr/src/redhat/SOURCES/ [root@boss SOURCES]# wget http://www.sendmail.org/˜ca/email/patches/mrbl.p3 --18:55:59-- http://www.sendmail.org:80/%7Eca/email/patches/mrbl.p3 => `mrbl.p3' Connecting to www.sendmail.org:80... connected HTTP request sent, awaiting response... 200 OK Length: 6,040 [text/plain] 0K -> ..... [100%] 18:56:00 (11.17 KB/s) - `mrbl.p3' saved [6040/6040]
For our purposes this is all very important, but we are particularly interested in the file:
because if we're really going to patch the RPM, we need to edit the spec file.