The sendmail.cf and sendmail.mc Files
The m4 macro processor program generates the
The configuration process is basically a matter of creating a suitable
A
Two Example sendmail.mc Files
If you're an administator of a number of different mail hosts, you might not want to name your configuration file
Most sendmail configurations today use SMTP only. It is very simple to configure sendmail for SMTP. Example 18.1 expects a DNS name server to be available to resolve hosts and will attempt to accept and deliver all mail for hosts using just SMTP.
Example 18.1: Sample Configuration File vstout.smtp.m4
divert(-1)
#
# Sample configuration file for vstout - smtp only
#
divert(0)
VERSIONID(`@(#)sendmail.mc 8.7 (Linux) 3/5/96')
OSTYPE(`linux')
#
# Include support for the local and smtp mail transport protocols.
MAILER(`local')
MAILER(`smtp')
#
FEATURE(rbl)
FEATURE(access_db)
# end
A
Example 18.2: Sample Configuration File vstout.uucpsmtp.m4
divert(-1)
#
# Sample configuration file for vstout
#
divert(0)
VERSIONID(`@(#)sendmail.mc 8.7 (Linux) 3/5/96')
OSTYPE(`linux')
dnl
# moria is our smart host, using the 'uucp-new' transport.
define(`SMART_HOST', `uucp-new:moria')
dnl
# Support the local, smtp and uucp mail transport protocols.
MAILER(`local')
MAILER(`smtp')
MAILER(`uucp')
LOCAL_NET_CONFIG
# This rule ensures that all local mail is delivered using the
# smtp transport, everything else will go via the smart host.
R$* ‹ @ $*.$m. › $* $#smtp $@ $2.$m. $: $1 ‹ @ $2.$m. › $3
dnl
#
FEATURE(rbl)
FEATURE(access_db)
# end
If you compare and contrast the two configurations, you might be able to work out what each of the configuration parameters does. We'll explain them all in detail.
Typically Used sendmail.mc Parameters
A few of the items in the
1.
2.
3.
4.
5. Local macro definitions
6.
7.
We'll talk about each of these in turn in the following sections and refer to our examples in Example 18.1 and Example 18.2, when appropriate, to explain them.