
206 Chapter 16. Email
Figure 16-1. virtusertable example
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 that contains the new configuration.
16.3.4. Common Sendmail Configuration Changes
Although a default sendmail.cf file is installed in /etc/ during the Red Hat Linux installation
process, you will need to alter it to utilize some of the program’s more advanced features.
When altering the Sendmail configuration file, it is best generate a entirely new /etc/sendmail.cf
file instead of editing an existing one.
Important
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/sendmail.cf command. After creating a new
/etc/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. The m4 macro processor is included
with the sendmail-cf package.
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/sendmail.cf by running:
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/sendmail.cf files are configured.
16.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 does all their mail. On that machine, add the names of machines for which
mail.bigcorp.com will handle mail to /etc/mail/local-host-names. Here is an example:
Commenti su questo manuale