Securing-Optimizing-RH-Linux-1_2_262
Comments and suggestions concerning this book should be mailed to gmourani@videotron.ca
© Copyright 1999-2000 Gerhard Mourani and Open Network Architecture ®
262
dnl file. If you modify this file you will have to regenerate the
dnl /etc/sendmail.cf by running this macro config through the m4
dnl preprocessor:
dnl
dnl cp sendmail.8.9.3.tar.gz /var/tmp
dnl cd /var/tmp
dnl tar xzpf sendmail.8.9.3.tar.gz
dnl cd /var/tmp/sendmail-8.9.3/cf/cf
dnl m4 ../m4/cf.m4 /etc/null.mc > /etc/sendmail.cf
dnl
dnl You will need to have the sendmail source distribution for this to
dnl work.
divert(0)
OSTYPE(`linux')
FEATURE(`nullclient',`mail.openarch.com')
undefine(`ALIAS_FILE')
This tells null.mc file to set itself up for this particular configuration setup with:
divert(-1) and divert(0)
The divert(-1) will delete the crud in the resulting output file and the divert(0) restores regular
output.
OSTYPE(`linux)
This configuration option specifies the default operating system Sendmail will running on, in our
case the linux system. This item is one of the minimal information requiring by the mc file.
FEATURE(`nullclient',`mail.openarch.com')
This m4 macro set your clients machines to never receive mail directly, send their mail to a
Central Mail Hub and they relay all mail through that server rather than sending directly. This
feature creates a stripped down configuration file containing nothing but support for forwarding all
mail to a Mail Hub via a local SMTP-based network. The argument `mail.openarch.com
included in this feature is the canonical name of that Mail Hub. You should, of course, change this
canonical name to reflect your Mail Hub Server for example: FEATURE(`nullclient',`
my.mailhub.com').
undefine(`ALIAS_FILE')
This configuration option prevent the nullclient version of Sendmail from trying to access
/etc/aliases and /etc/aliases.db files. With the adding of this line in the .mc file, you dont
need to have aliases file on all your internal neighbor client Sendmail machines. Aliases file is
require only on the Mail Hub Server for all server and client aliases on the network.
Now that our macro configuration file null.mc is create, we can build the Sendmail configuration
file sendmail.cf from these statements in all our neighbor server, client machines with the
following commands:
[root@deep /]# cd /var/tmp/sendmail-version/cf/cf/
[root@deep cf]# m4 ../m4/cf.m4 /etc/null.mc > /etc/sendmail.cf
Step 2
No mail should ever again be delivered to your local machine. Since there will be no incoming
mail connections, you no longer needed to run a Sendmail daemon on your neighbor or local
server, client machines.