One common sendmail configuration is to have a single machine act as
a mail gateway for all the machines on your network. For instance,
at Red Hat Software we have a machine mail.redhat.com that does all
our mail. On that machine we simply need to add the names of machines
for which mail.redhat.com will handle mail to /etc/sendmail.cw.
Here is an example:
Then on the other machines, torgo, poodle, and devel,
we need to edit /etc/sendmail.cf to ``masquerade'' as
mail.redhat.com
when sending mail, and to forward any local mail processing to
redhat.com. Find the DH and DM lines in
/etc/sendmail.cf and edit them thusly:
With this type of configuration, all mail sent will appear as if it were
sent from redhat.com, and any mail sent to torgo.redhat.com
or the other hosts will be delivered to mail.redhat.com.
Please be aware that if you configure your system to masquerade as
another any email 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@poodle.redhat.com by
the cron daemon would be sent to root@mail.redhat.com.
# sendmail.cw - include all aliases for your machine here.
torgo.redhat.com
poodle.redhat.com
devel.redhat.com
# who I send unqualified names to (null means deliver locally)
DRmail.redhat.com
# who gets all local email traffic
DHmail.redhat.com
# who I masquerade as (null for no masquerading)
DMredhat.com