home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


Previous Section Next Section

FEATURE(msp)

Create a mail submission cf file V8.12 and above

The msp feature is used to create a submit.cf file for use with a mail submission program, which is a command-line sendmail that functions as a mail submission agent (MSA).

In its simplest form this feature is used like this:

FEATURE(`msp')

Here, a configuration file suitable for an MSA will be created. The resulting MSA will forward any message it gathers to the host localhost and will do so without looking up MX records for localhost. Unless told otherwise (see as described later), the MSA will submit messages locally to port 25.

In the event that mail does not go to the local host, first check to see that the host named localhost is correctly defined on your machine:

% nslookup localhost
Server:  your.name.server
Address:  123.45.67.89

Name:    localhost
Address:  127.0.0.1

If the address printed is not 127.0.0.1 for IPv4, or ::1 for IPv6, either correct the problem with your own name server, or contact your ISP and demand a correction. If that fails, you can still send to the local host by putting the correct address directly into the msp declaration as an argument:

FEATURE(`msp', `[127.0.0.1]')

Here, the square brackets tell sendmail that it is dealing with an address, rather than a hostname.

The argument can also be used to tell the MSA to connect to a host other than localhost:

FEATURE(`msp', `otherhost')

Here, submitted mail will be forwarded to the host otherhost for delivery, or for relaying outward. Unless you suppress it, the MSA will look up MX records for otherhost and, if found, will deliver to the MX records found. If that is inappropriate, you can suppress MX lookups by surrounding the hostname with square brackets:

FEATURE(`msp', `[otherhost]')  suppress MX lookups

A second argument can be supplied to this feature which will cause the MSA to submit mail on port 587 instead of on port 25:

FEATURE(`msp', `[otherhost]', `MSA')

If the second argument is a literal MSA, the MSA will connect to port 587. If it is anything else, no change in port will be made.

The second argument can be present and the first absent if you wish to connect to port 587 on localhost:

FEATURE(`msp', `', `MSA')

If you wish to have all envelope and header addresses rewritten to appear as if they are from otherhost you can combine the MASQUERADE_AS mc configuration macro with this feature:

MASQUERADE_AS(`otherhost')
FEATURE(`msp', `[otherhost]', `MSA')

The msp feature is used to create the submit.cf file. See Section 2.6.2 for a description of this process. Also see cf/SECURITY and cf/README in the source distribution.

    Previous Section Next Section