Installation guide
214 Chapter 15. Email
For example, if you want all email addressed to any domain.com account to be delivered to
<bob@otherdomain.com>, you need to add a line similar to the one below to the virtusertable
file:
@domain.com bob@otherdomain.com
Then, to add this new information to the virtusertable.db file, execute makemap hash
/etc/mail/virtusertable
/etc/mail/virtusertable as root. This will create a new
virtusertable.db containing the new configuration.
15.3.4. Common Sendmail Configuration Changes
Although a default sendmail.cf file is installed in /etc/mail/ during the Red Hat Linux installa-
tion process, you will need to alter it to use some of the program’s more advanced features.
When altering the Sendmail configuration file, it is best generate a entirely new
/etc/mail/sendmail.cf file instead of editing an existing one.
Caution
Before changing the sendmail.cf file, it is a good idea to backup the default version.
To add the desired functionality Sendmail edit the /etc/mail/sendmail.mc file. When you
are finished, use the m4 macro processor to generate a new sendmail.cf by executing the m4
/etc/mail/sendmail.mc /etc/mail/sendmail.cf command. After creating a new
/etc/mail/sendmail.cf, you must restart Sendmail to make it take effect. The easiest way to do
this is to type the /sbin/service sendmail restart command as root.
By default, the m4 macro processor is installed with Sendmail and is part of the sendmail-cf pack-
age.
Important
The default sendmail.cf does not allow sendmail to accept network connections from any host
other than the local computer. If you want to configure sendmail as a server for other clients, please
edit /etc/mail/sendmail.mc and change DAEMON_OPTIONS to also listen on network devices or
comment out this option all together. Then regenerate /etc/mail/sendmail.cf by running:
m4 /etc/mail/sendmail.mc
/etc/mail/sendmail.cf
This configuration should work for most SMTP-only sites. It will not work for UUCP (UNIX to UNIX
Copy) sites; you will need to generate a new sendmail.cf if you must use UUCP mail transfers.
You should consult the /usr/share/sendmail-cf/README file before you edit any of the files
in the directories under the /usr/share/sendmail-cf directory, as they can affect how future
/etc/mail/sendmail.cf files are configured.
15.3.4.1. Masquerading
One common Sendmail configuration is to have a single machine act as a mail gateway for all
the machines on the network. For instance, a company may want to have a machine called
mail.bigcorp.com that handles all their email and assigns a consistant return address to all out
going mail.