-->
Previous | Table of Contents | Next |
We will look at each of these tables in a little more detail in a moment. As mentioned, all the sendmail configuration files are difficult to edit manually. Using sendmail+IDA makes life much easier because IDA handles configuration through table-driven options. Each has a much simpler syntax than the sendmail.cf file uses.
The sendmail+IDA system uses a preprocessor such as m4 or dbm to generate the proper configuration files after you have specified values for many parameters. After the preprocessor, a makefile is used to create the final configuration files.
When using sendmail+IDA, the sendmail.cf file is not edited directly. Instead, a configuration process is used to generate the changes. The configuration routine is driven by a file called sendmail.m4 which provides basic information about your systems name, the pathnames used on your system, and the default mailer used. While the sendmail.m4 file can get pretty long, for most Linux installations that use UUCP or SMTP for mail transfers the file needs only basic information.
One important section of the sendmail.m4 file is the definitions of directories. This area usually starts with a line defining LIBDIR, which look like this:
dnl #define(LIBDIR, /usr/local/lib/mail)
The LIBDIR directory is where sendmail+IDA looks for configuration files and routing tables. This is usually left alone since the default value is the general location for all Linux mail systems. If the path shown in the sendmail.m4 file is correct, dont modify the file. This entry is usually hardcoded into the sendmail binary and doesnt need overwriting by the sendmail.m4 file (or its generated sendmail.cf file). If you need to change this value, you will have to remove the dnl from the front of the line (which makes the line essentially a comment), then add the correct path and rebuild sendmail.cf.
The local mails used by sendmail is defined in the line that contains the variable LOCAL_MAILER_DEF and looks like this:
define(LOCAL_MAILER_DEF, mailers.linux)dnl
This line is necessary because sendmail doesnt actually handle mail delivery. Instead, another program takes care of this step. By default, the value used for the local mailer (which is almost always deliver) is contained in a file called mailers.linux. This file is referenced in the LOCAL_MAILER_DEF entry in the sendmail.m4 file. This requires you to check the mailers.linux file in the same subdirectory (usually /usr/local/lib/mail/mailers.linux) to ensure the deliver program (or whatever delivery agent you use) is properly entered. A typical mailers.linux file looks like this:
# mailers.linux Mlocal, P=/usr/bin/deliver, F=SlsmFDMP, S=10, R=25/10, A=deliver $u Mprog, P=/bin/sh, F=lsDFMeuP, S=10, A=sh -c $u
The deliver mail delivery agent is also specified in the file Sendmail.mc, which is used to build sendmail.cf. You need to check this Sendmail.mc file, too, if the name of your delivery agent is not deliver. (If you are using deliver, dont worry about this file.) The Sendmail.mc file is important and must be read in when sendmail.m4 is processed. There is usually a line in sendmail.m4 that makes sure this happens. The line, which usually occurs at the top of the sendmail.m4 file, looks like this:
include(Sendmail.mc)dnl
You may need to specify some entries in the PSEUDODOMAINS variable. This variable is used to handle systems that cant expand into domain names properly, usually UUCP networks. The entries in the PSEUDODOMAINS field tells sendmail+IDA not to use DNS for these networks (which will always fail). Typically, the PSEUDODOMAINS variable is set to the following values:
define(PSEUDODOMAINS, BITNET UUCP)dnl
You can use the PSEUDONYMS field to hide your machine names from the outside world. This means that whether mail was sent frommerlin.tpci.com or chatton.tpci.com doesnt matter: the recipient on another network sees only the address tpci.com. This is called hiding the local machines. When used, sendmail accepts mail from all machines identified in the PSEUDONYMS variable. The PSEUDONYMS field is usually used as shown in the following line:
define(PSEUDONYMS, tpci.com)dnl
This entry lets any machine with the network type tpci.com send mail through sendmail.
To define the name of your local machine, you use the DEFAULT_HOST variable. This is usually defined as the same name as your mail server (or your basic machines name if you are not on a network). For example, the following entry can be used to set the default mail servers name:
define(DEFAULT_HOST, merlin.tpci.com)dnl
If you do not set a valid name for the DEFAULT_HOST variable, no mail will be returned properly to your system.
If your system is not a mail gateway to the Internet (or other networks that are accessible from your LAN), you can set your Linux system to send mail on to another machine for processing. This is done by setting the RELAY_HOST and RELAY_MAILER variables in sendmail.c4. These variables set the name of the mail server that all mail should be passed on to. For example, to set your local system to route all outbound mail to a machine called wizard, set these two lines to look like this:
define(RELAY_HOST, wizard)dnl define(RELAY_MAILER, UUCP=A)dnl
The RELAY_MAILER line specifies the mailer to use to send messages on to the RELAY_HOST.
Previous | Table of Contents | Next |