-->
Previous Table of Contents Next


Building sendmail.cf from sendmail.m4

Now that you have configured the sendmail.m4 file and its dependent files, you can generate the sendmail.cf file. This is done with the m4 processor. When the sendmail.m4 file is ready to be processed, issue the command


make sendmail.cf

or you can substitute your site name if you renamed your sendmail.m4 file to reflect your site name (in other words, if you created a file called tpci.m4, you should specify tpci.cf in the command).

After the file has been processed, copy it to the /etc directory (which is where the file normally resides) and start up sendmail with the command


/usr/lib/sendmail -bd -q1h

or reboot your machine (because sendmail usually starts from the rc startup files). The exact paths may be different with your system, so check where these configuration files are stored.

Using sendmail Version 8

The latest version of sendmail supplied for most Linux systems is version 8. If you didn’t see versions 6 or 7, don’t worry: They never existed. The sendmail system jumped from release 5.X to 8. (One of the important additions to version 8 of sendmail is the anti-spam filters that lets you remove spam email. If you are getting a lot of spam, this feature alone is worth the upgrade trouble!)

For the most part, sendmail version 8 is similar in configuration details to the other releases of sendmail. One change is the inclusion of four different UUCP mail routines. Choose one of the four UUCP versions based on the following features:

  uucp-old (same as “uucp”) Classic UUCP that uses a bang-style address and can send to only one address at a time (duplicate messages are sent when multiple recipients are specified). This version should be used only if you really need compatibility with old-style UUCP systems.
  uucp-new (previously know as “suucp”) The same as UUCP except that it provides the rmail command to allow several recipients. This version is not much of an improvement over uucp-old.
  uucp-dom Allows domain name-style addressing. May not be compatible with some systems you may have to connect to.
  uucp-uudom A combination of uucp-new and uucp-dom to provide the best features of both. Allows bang- and DNS-style addresses with proper handling of headers.

Whichever version of UUCP you choose, it should be copied or linked to the normal UUCP binary on your Linux system.

smail

The smail mail system is similar to the sendmail system in most of its actions, although the configuration process is different. In some ways, smail is easier to work with than sendmail and can be a good choice for smaller systems. If you choose to use smail as your mailer, you will have to make some manual modifications to configuration files because there are few automated or scripted routines available.

The smail system has many options and configuration details, most of which are never used. We’ll look at the primary controlling parameters that most Linux users will need, and essentially ignore those that are very seldom (if ever) used in real situations. For more information on the options and configuration controls we skip over in this chapter, see the man pages or smail documentation. We’ll focus this chapter on showing you how to get smail up and running quickly and easily to handle the situations most Linux systems will find themselves working with.

Setting Up smail

The smail system requires several links to exist so smail can execute properly. The two most important links are to the files /usr/bin/rmail and /usr/lib/sendmail (sometimes located as /usr/sbin/sendmail, depending on the version of Linux). These links are necessary because most user mail applications send outgoing mail to either rmail or sendmail (depending on the mail software), and this has to be redirected to smail. Links allow this redirection to occur transparently without altering the user mail applications.

You should verify that the rmail and sendmail files are linked to smail, and if not, establish the links. Usually, the links established are symbolic and will show in a direc-tory listing with an entry like this:


lrwxrwxrwx  1 root  root   6 Sep 16:35  file1 -> file2

The arrow (->) shows that a symbolic link exists. (For more information on links and symbolic links, see Chapter 8, “Using the File System.”) Check both the rmail and sendmail binaries for these symbolic links. If the symbolic links do not exist already, create them with the following commands:


ln -s /usr/local/bin/smail /usr/bin/rmail

ln -s /usr/local/bin/smail /usr/lib/sendmail

Of course you should substitute whatever directory pathnames are valid on your system for smail, sendmail, and rmail. After you have created the links, verify that they exist by displaying the directories and look for the symbolic link notation shown earlier.

If there is the possibility of mail either entering or leaving your system through an SMTP channel, you should also establish a link between the smail program and the SMTP system. Use the command:


ln -s /usr/local/bin/smail /usr/sbin/smtpd

to set up the link (substituting proper paths for your system). Next, the SMTP service has to be allowed through the TCP configuration files. This is enabled by setting the /etc/services file to specifically allow SMTP connections. There is a line in the /etc/services file that looks like


smtp  25/tcp  # Simple Mail Transfer Protocol

which you should verify to be not commented out (indicated by a pound sign as the first character). This allows the SMTP link to be established as TCP port number 25 (the default value).

If you are going to leave smail as a daemon (started automatically with the system boot), ensure that the smail daemon is started in the rc files (such as rc.inet2). The usual command line for the smail daemon looks like this:


/usr/local/bin/smail -bd -q15m

The -bd option turns the daemon operation of smail on, which the -q15m tells smail to process messages every fifteen minutes. If you want more frequent mail delivery, change the value in the rc file. Alternatively, if you want mail processing less often to relieve a heavily loaded system, increase the value.


Previous Table of Contents Next