Since our local clients machines never receive mail directly from the outside world, and relay, send 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 responds to this special setup for our neighbour
or local server client machines. This m4 macro file is simple to create and configure because it doesn't need a lot of features, as the configuration file -sendmail.mc, for
the Central Mail Hub server did.
The null.mc file is for the local or neighbour client and server machines only
Create the null.mc file, touch/var/tmp/sendmail-version/cf/cf/null.mc and add the following lines:
This configuration option specifies the default operating system Sendmail will be running on, in our case, the linux system. This item is one of the minimal pieces of information
required by the mc file.
This configuration option will specify and describe a particular domain appropriated for your environment.
This m4 macro sets your clients machines to never receive mail directly, to send their mail to a Central Mail Hub, and 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.openna.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').
This configuration option prevents the nullclient version of Sendmail from trying to access /etc/mail/aliases and /etc/mail/aliases.db files. With the adding of this
line in the .mc file, you don't need to have an aliases file on all your internal neighbor client Sendmail machines. Aliases files are required only on the Mail Hub Server
for all server and client aliases on the network.
We advice that with this kind of configuration, no mailers should be defined, and no aliasing or forwarding is done.
Now that our macro configuration file null.mc is created, we can build the Sendmail configuration file sendmail.cf from these statements in all our neighbor servers, and client
machines with the following commands:
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.
To stop the Sendmail daemon from running on your neighbor or local server, or client machines, edit or create the /etc/sysconfig/sendmail file and change/add the lines that read:
The QUEUE=1h under /etc/sysconfig/sendmail file causes Sendmail to process the queue once every 1 hour. We leave that line in place because Sendmail still needs to process
the queue periodically in case the Mail Hub is down.
Remove the following files from your system, use the following command:
Local machines never use aliases, access, or other maps database. Since all map file databases are located and used on the Central Mail Hub Server for all local machines we may have on the network, we can safety remove the following commands and man pages from all our local machines.
Remove the unnecessary Procmail program from your entire local Sendmail server or client. Since local machines send all internal and outgoing mail to the mail Hub Server for future delivery, we don't need to use a complex local delivery agent program like Procmail to do the job. Instead we
can use the default /bin/mail program.
To remove Procmail from your system, use the following command: