Securing-Optimizing-RH-Linux-1_2_261
Comments and suggestions concerning this book should be mailed to gmourani@videotron.ca
© Copyright 1999-2000 Gerhard Mourani and Open Network Architecture ®
261
The mailertable & mailertable.db files
A mailertable is a database that maps host.domain names to special delivery agent and new
domain name pairs. With this feature mail on your network can be delivered through the use of a
particular delivery agent to a new local or remote domain name.
·
To create the virtusertable, domaintable, mailertable, and their corresponding .db
files into /etc/mail directory, use the following commands:
[root@deep /]# for map in virtusertable domaintable mailertable
> do
> touch /etc/mail/${map}
> chmod 0644 /etc/mail/${map}
> makemap hash /etc/mail/${map}.db < /etc/mail/${map}
> chmod 0644 /etc/mail/${map}.db
> done
The /etc/sendmail.cw file for the Central Mail Hub
The /etc/sendmail.cw file is read to obtain alternative names for the local host (in our example,
the Central Mail Hub Server). One use for such a file might be to declare a list of hosts in your
network for which the local host is acting as the MX recipient. Also note that sendmail.cw file is
required only on server that receive, forward and send mail to the out side network like the
Central Mail Hub Server. On that machine we simply need to add the names of machines for
which it (i.e. mail.openarch.com) will handle mail to /etc/sendmail.cw. Here is an example:
Create the sendmail.cw file (touch /etc/sendmail.cw) and add the following line:
# sendmail.cw - include all aliases for your machine here.
openarch.com
deep.openarch.com
www.openarch.com
win.openarch.com
mail.openarch.com
With this type of configuration, all mail sent will appear as if it were sent from openarch.com,
and any mail sent to www.openarch.com or the other hosts will be delivered to
mail.openarch.com our mail Hub.
Please be aware that if you configure your system to masquerade as another any e-mail sent
from your system to your system will be sent to the machine you are masquerading as. For
example, in the above illustration, log files that are periodically sent to root@www.openarch.com
by the cron daemon of Linux would be sent to root@mail.openarch.com our Mail Hub.
The /etc/null.mc file for the local or neighbor client and server machines
Since our local clients machines never receive mail directly from the out side world and send,
relay all their mail through the Mail Hub server, we will create a special file called null.mc, which,
when later processed, will create a customized sendmail.cf configuration file that respond to this
special setup for our neighbor or local server client machines. This m4 macro file is simple to
create and configure because it dont need lot features like configuration file (sendmail.mc) for the
Central Mail Hub server.
Step 1
Create the null.mc file (touch /etc/null.mc) and add the following lines:
divert(-1)
dnl This is the macro config file used to generate the /etc/sendmail.cf