Once your MX record has taken effect, and once the hub has been configured to recognize the client machine as itself, no mail should ever again be delivered to your local machine.  Since there will be no incoming mail connections, you no longer need to run a sendmail daemon. Preventing the daemon from running involves two steps. First you need to kill the running daemon, then you need to modify your rc files so the daemon never runs again. We won't show you how to kill the daemon, because you have already learned that (see Section 18.104.22.168, "Kill and restart, beginning with V8.7"). Instead, we'll jump directly into preventing it from ever running again.
 Actually, some sites ignore MX records and try to deliver to your local machine anyway. See Section 36.7.11, -bs for a discussion of one way to solve this problem.
grep "sendmail.*-bd" /etc/init.d/*/etc/init.d/mail: /usr/lib/sendmail -bd -q15m &
Under BSD 4.4 UNIX, however, they will look like this:
grep sendmail /etc/rc*/etc/rc:echo -n ' sendmail'; sendmail -bd -q30m
In the following, we will describe the BSD version. It is somewhat simpler to describe, but the underlying lessons are the same for both.
To be safe, save a copy of the rc file before changing it:
cp /etc/rc /etc/rc.orig
Then edit the rc file and search for the shell commands that runs sendmail. They will look something like this:
echo -n ' nfsd'; nfsd -u -t 6 echo -n ' nfsiod'; nfsiod 4 echo -n ' sendmail'; sendmail -bd -q30m note echo -n ' inetd'; inetd
echo -n ' sendmail'; sendmail -q30m remove -bd
Extreme care must be taken in making changes to any of the rc files. These are executed only when the system is rebooted, so errors won't show up until a very awkward moment. A mistake here can potentially keep your workstation from booting.
-bd switch caused sendmail to run as a daemon
and listen for incoming SMTP connections. We removed that
switch so that sendmail would no longer listen for connections.
that remains causes sendmail to process the queue once
every 30 minutes. We leave that switch in place because sendmail
still needs to process the queue periodically
(in case the hub is down).
 An alternative approach is to use cron(8) to execute sendmail periodically with a bare