Web linux-server.50webs.com

Linux Mail Server

Configuring the sendmail.cf File:

It's important to realize how rarely the sendmail.cf file needs to be modified on a typical Linux system. The configuration file that comes with your Linux system will work. Generally, you modify the sendmail configuration not because you need to, but because you want to. You modify it to improve the way things operate, not to get them to operate. To illustrate this, let's look at the default Red Hat configuration on the system parrot.foobirds.org.

Using the default configuration, the From address on outbound e-mail is user@parrot.foobirds.org. This is a valid address, but assume that it's not exactly what you want. In the last chapter, you defined MX records for the domain. To use them, you want people to use addresses in the form user@foobirds.org, so you don't want the hostname in outbound e-mail addresses. To create the new configuration, you need to understand the purpose of class M and macro M, both of which are found in the Local Info section of the sendmail.cf file.

sendmail calls hiding the real hostname masquerading. Thus, the name of the macro used to rewrite the sender host address is M. Set M to the domain name to replace the name of the local host in outbound mail with the name of the domain. Class M defines other hostnames, not just the local hostname, that also should be rewritten to the value of macro M. Class M is used on mail servers that need to rewrite sender addresses for their clients.

.