divert(-1)
dnl
dnl Here's a sendmail 8.11 script you can use with very little editing
dnl
include(`/usr/share/sendmail-cf/m4/cf.m4')
VERSIONID(`linux setup for Red Hat Linux')dnl
OSTYPE(`linux')
dnl 8:12 is the user:group number for user "mail" in /etc/passwd.dnl
define(`confDEF_USER_ID',``8:12'')dnl
dnl Definitions have to come before the FEATURES associated with them
define(`confTO_CONNECT', `1m')dnl
define(`confTRY_NULL_MX_LIST',true)dnl
define(`confDONT_PROBE_INTERFACES',true)dnl
define(`PROCMAIL_MAILER_PATH',`/usr/bin/procmail')dnl
dnl This goes with feature redirect
define(`ALIAS_FILE', `/etc/aliases')dnl
define(`UUCP_MAILER_MAX', `2000000')dnl
define(`confUSERDB_SPEC', `/etc/mail/userdb.db')dnl
define(`confPRIVACY_FLAGS', `authwarnings,novrfy,noexpn,restrictqrun')dnl
define(`confAUTH_OPTIONS', `A')dnl
FEATURE(`no_default_msa',`dnl')dnl
dnl SendMailRestrictedShell restricts the .forward files users can put in their $HOME
FEATURE(`smrsh',`/usr/sbin/smrsh')dnl
dnl define(`confSAFE_FILE_ENV',`/var/mailjail')dnl
FEATURE(`mailertable',`hash -o /etc/mail/mailertable.db')dnl
FEATURE(`virtusertable',`hash -o /etc/mail/virtusertable.db')dnl

dnl redirect lets you define aliases in /etc/alias
FEATURE(redirect)dnl
FEATURE(always_add_domain)dnl
dnl use cw_file makes sendmail read local_host_names file
FEATURE(use_cw_file)dnl
dnl use_ct_file makes sendmail read trusted_users_file
FEATURE(use_ct_file)dnl
dnl The '-t' option will retry delivery if e.g. the user runs over his quota.
FEATURE(local_procmail,`',`procmail -t -Y -a $h -d $u')dnl
dnl /etc/access.db is a list of who can relay through this machine.
dnl Try makemap -C sendmail.cf -v hash access.db < access to see what it's doing.

FEATURE(`access_db',` hash -T<TMPF> /etc/mail/access.db')dnl
dnl blacklist restricts some users who shouldn't get mail from getting it, like "nobody"
FEATURE(`blacklist_recipients')dnl
dnl By default, sendmail won't relay (potentially fake) domains it can't resolve. The feature below that lets you do it should be commented out.
dnl FEATURE(`accept_unresolvable_domains')
dnl FEATURE(`relay_based_on_MX')
MASQUERADE_AS(`domainname.cxm')dnl
MASQUERADE_DOMAIN(`mail.domainname.cxm')
dnl
EXPOSED_USER(`root')dnl
FEATURE(masquerade_entire_domain)dnl
FEATURE(masquerade_envelope)dnl
MAILER(smtp)dnl
MAILER(procmail)dnl
Cwdomainname.cxm
dnl