lkundrak / rpms / sendmail

Forked from rpms/sendmail 4 years ago
Clone
cvsdist 68b31f4
divert(-1)dnl
cvsdist 68b31f4
dnl #
cvsdist 68b31f4
dnl # This is the sendmail macro config file for m4. If you make changes to
cvsdist 68b31f4
dnl # /etc/mail/sendmail.mc, you will need to regenerate the
cvsdist 68b31f4
dnl # /etc/mail/sendmail.cf file by confirming that the sendmail-cf package is
cvsdist 68b31f4
dnl # installed and then performing a
cvsdist 68b31f4
dnl #
cvsdist 68b31f4
dnl #     make -C /etc/mail
cvsdist 68b31f4
dnl #
cvsdist 68b31f4
include(`@@PATH@@/m4/cf.m4')dnl
cvsdist 68b31f4
VERSIONID(`setup for Red Hat Linux')dnl
cvsdist 68b31f4
OSTYPE(`linux')dnl
cvsdist 68b31f4
dnl #
cvsdist 2ddbe24
dnl # default logging level is 9, you might want to set it higher to
cvsdist 2ddbe24
dnl # debug the configuration
cvsdist 2ddbe24
dnl #
cvsdist 2ddbe24
dnl define(`confLOG_LEVEL', `9')dnl
cvsdist 2ddbe24
dnl #
cvsdist 68b31f4
dnl # Uncomment and edit the following line if your outgoing mail needs to
cvsdist 68b31f4
dnl # be sent out through an external mail server:
cvsdist 68b31f4
dnl #
cvsdist 05fa9f4
dnl define(`SMART_HOST',`smtp.your.provider')
cvsdist 68b31f4
dnl #
cvsdist 53226c2
define(`confDEF_USER_ID',``8:12'')dnl
cvsdist 333a3fa
dnl define(`confAUTO_REBUILD')dnl
cvsdist 53226c2
define(`confTO_CONNECT', `1m')dnl
cvsdist 53226c2
define(`confTRY_NULL_MX_LIST',true)dnl
cvsdist 53226c2
define(`confDONT_PROBE_INTERFACES',true)dnl
cvsdist 53226c2
define(`PROCMAIL_MAILER_PATH',`/usr/bin/procmail')dnl
cvsdist 83f6af4
define(`ALIAS_FILE', `/etc/aliases')dnl
cvsdist 2ddbe24
define(`STATUS_FILE', `/var/log/mail/statistics')dnl
cvsdist 53226c2
define(`UUCP_MAILER_MAX', `2000000')dnl
cvsdist 53226c2
define(`confUSERDB_SPEC', `/etc/mail/userdb.db')dnl
cvsdist 83f6af4
define(`confPRIVACY_FLAGS', `authwarnings,novrfy,noexpn,restrictqrun')dnl
cvsdist 83f6af4
define(`confAUTH_OPTIONS', `A')dnl
cvsdist 68b31f4
dnl #
cvsdist 68b31f4
dnl # The following allows relaying if the user authenticates, and disallows
cvsdist 68b31f4
dnl # plaintext authentication (PLAIN/LOGIN) on non-TLS links
cvsdist 68b31f4
dnl #
cvsdist 68b31f4
dnl define(`confAUTH_OPTIONS', `A p')dnl
cvsdist 68b31f4
dnl # 
cvsdist 68b31f4
dnl # PLAIN is the preferred plaintext authentication method and used by
cvsdist 68b31f4
dnl # Mozilla Mail and Evolution, though Outlook Express and other MUAs do
cvsdist 68b31f4
dnl # use LOGIN. Other mechanisms should be used if the connection is not
cvsdist 68b31f4
dnl # guaranteed secure.
cvsdist 2ddbe24
dnl # Please remember that saslauthd needs to be running for AUTH. 
cvsdist 68b31f4
dnl #
cvsdist 333a3fa
dnl TRUST_AUTH_MECH(`EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
cvsdist 333a3fa
dnl define(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
cvsdist 68b31f4
dnl #
cvsdist 68b31f4
dnl # Rudimentary information on creating certificates for sendmail TLS:
cvsdist 67548a7
dnl #     cd /usr/share/ssl/certs; make sendmail.pem
cvsdist 67548a7
dnl # Complete usage:
cvsdist 68b31f4
dnl #     make -C /usr/share/ssl/certs usage
cvsdist 68b31f4
dnl #
cvsdist 67548a7
dnl define(`confCACERT_PATH',`/usr/share/ssl/certs')
cvsdist 67548a7
dnl define(`confCACERT',`/usr/share/ssl/certs/ca-bundle.crt')
cvsdist 67548a7
dnl define(`confSERVER_CERT',`/usr/share/ssl/certs/sendmail.pem')
cvsdist 67548a7
dnl define(`confSERVER_KEY',`/usr/share/ssl/certs/sendmail.pem')
cvsdist 68b31f4
dnl #
cvsdist 68b31f4
dnl # This allows sendmail to use a keyfile that is shared with OpenLDAP's
cvsdist 68b31f4
dnl # slapd, which requires the file to be readble by group ldap
cvsdist 68b31f4
dnl #
cvsdist 68b31f4
dnl define(`confDONT_BLAME_SENDMAIL',`groupreadablekeyfile')dnl
cvsdist 68b31f4
dnl #
cvsdist 53226c2
dnl define(`confTO_QUEUEWARN', `4h')dnl
cvsdist 53226c2
dnl define(`confTO_QUEUERETURN', `5d')dnl
cvsdist 53226c2
dnl define(`confQUEUE_LA', `12')dnl
cvsdist 53226c2
dnl define(`confREFUSE_LA', `18')dnl
cvsdist 333a3fa
define(`confTO_IDENT', `0')dnl
cvsdist 83f6af4
dnl FEATURE(delay_checks)dnl
cvsdist 83f6af4
FEATURE(`no_default_msa',`dnl')dnl
cvsdist 53226c2
FEATURE(`smrsh',`/usr/sbin/smrsh')dnl
cvsdist 101e095
FEATURE(`mailertable',`hash -o /etc/mail/mailertable.db')dnl
cvsdist 101e095
FEATURE(`virtusertable',`hash -o /etc/mail/virtusertable.db')dnl
cvsdist 53226c2
FEATURE(redirect)dnl
cvsdist 53226c2
FEATURE(always_add_domain)dnl
cvsdist 53226c2
FEATURE(use_cw_file)dnl
cvsdist 83f6af4
FEATURE(use_ct_file)dnl
cvsdist 68b31f4
dnl #
cvsdist 67548a7
dnl # The following limits the number of processes sendmail can fork to accept 
cvsdist 67548a7
dnl # incoming messages or process its message queues to 12.) sendmail refuses 
cvsdist 67548a7
dnl # to accept connections once it has reached its quota of child processes.
cvsdist 67548a7
dnl #
cvsdist 67548a7
dnl define(`confMAX_DAEMON_CHILDREN', 12)dnl
cvsdist 67548a7
dnl #
cvsdist 67548a7
dnl # Limits the number of new connections per second. This caps the overhead 
cvsdist 67548a7
dnl # incurred due to forking new sendmail processes. May be useful against 
cvsdist 67548a7
dnl # DoS attacks or barrages of spam. (As mentioned below, a per-IP address 
cvsdist 67548a7
dnl # limit would be useful but is not available as an option at this writing.)
cvsdist 67548a7
dnl #
cvsdist 67548a7
dnl define(`confCONNECTION_RATE_THROTTLE', 3)dnl
cvsdist 67548a7
dnl #
cvsdist 68b31f4
dnl # The -t option will retry delivery if e.g. the user runs over his quota.
cvsdist 68b31f4
dnl #
cvsdist 101e095
FEATURE(local_procmail,`',`procmail -t -Y -a $h -d $u')dnl
cvsdist 333a3fa
FEATURE(`access_db',`hash -T<TMPF> -o /etc/mail/access.db')dnl
cvsdist 53226c2
FEATURE(`blacklist_recipients')dnl
cvsdist 83f6af4
EXPOSED_USER(`root')dnl
cvsdist 68b31f4
dnl #
cvsdist 68b31f4
dnl # The following causes sendmail to only listen on the IPv4 loopback address
cvsdist 68b31f4
dnl # 127.0.0.1 and not on any other network devices. Remove the loopback
cvsdist 68b31f4
dnl # address restriction to accept email from the internet or intranet.
cvsdist 68b31f4
dnl #
cvsdist 68b31f4
DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl
cvsdist 68b31f4
dnl #
cvsdist 68b31f4
dnl # The following causes sendmail to additionally listen to port 587 for
cvsdist 68b31f4
dnl # mail from MUAs that authenticate. Roaming users who can't reach their
cvsdist 68b31f4
dnl # preferred sendmail daemon due to port 25 being blocked or redirected find
cvsdist 68b31f4
dnl # this useful.
cvsdist 68b31f4
dnl #
cvsdist 68b31f4
dnl DAEMON_OPTIONS(`Port=submission, Name=MSA, M=Ea')dnl
cvsdist 68b31f4
dnl #
cvsdist 68b31f4
dnl # The following causes sendmail to additionally listen to port 465, but
cvsdist 68b31f4
dnl # starting immediately in TLS mode upon connecting. Port 25 or 587 followed
cvsdist 68b31f4
dnl # by STARTTLS is preferred, but roaming clients using Outlook Express can't
cvsdist 68b31f4
dnl # do STARTTLS on ports other than 25. Mozilla Mail can ONLY use STARTTLS
cvsdist 68b31f4
dnl # and doesn't support the deprecated smtps; Evolution <1.1.1 uses smtps
cvsdist 68b31f4
dnl # when SSL is enabled-- STARTTLS support is available in version 1.1.1.
cvsdist 68b31f4
dnl #
cvsdist 68b31f4
dnl # For this to work your OpenSSL certificates must be configured.
cvsdist 68b31f4
dnl #
cvsdist 68b31f4
dnl DAEMON_OPTIONS(`Port=smtps, Name=TLSMTA, M=s')dnl
cvsdist 68b31f4
dnl #
cvsdist 68b31f4
dnl # The following causes sendmail to additionally listen on the IPv6 loopback
cvsdist 68b31f4
dnl # device. Remove the loopback address restriction listen to the network.
cvsdist 68b31f4
dnl #
cvsdist 68b31f4
dnl DAEMON_OPTIONS(`port=smtp,Addr=::1, Name=MTA-v6, Family=inet6')dnl
cvsdist 68b31f4
dnl #
cvsdist 2ddbe24
dnl # enable both ipv6 and ipv4 in sendmail:
cvsdist 2ddbe24
dnl #
cvsdist 2ddbe24
dnl DAEMON_OPTIONS(`Name=MTA-v4, Family=inet, Name=MTA-v6, Family=inet6')
cvsdist 2ddbe24
dnl #
cvsdist 68b31f4
dnl # We strongly recommend not accepting unresolvable domains if you want to
cvsdist 68b31f4
dnl # protect yourself from spam. However, the laptop and users on computers
cvsdist 68b31f4
dnl # that do not have 24x7 DNS do need this.
cvsdist 68b31f4
dnl #
cvsdist 53226c2
FEATURE(`accept_unresolvable_domains')dnl
cvsdist 68b31f4
dnl #
cvsdist 53226c2
dnl FEATURE(`relay_based_on_MX')dnl
cvsdist 68b31f4
dnl # 
cvsdist 68b31f4
dnl # Also accept email sent to "localhost.localdomain" as local email.
cvsdist 68b31f4
dnl # 
cvsdist 68b31f4
LOCAL_DOMAIN(`localhost.localdomain')dnl
cvsdist 68b31f4
dnl #
cvsdist 68b31f4
dnl # The following example makes mail from this host and any additional
cvsdist 68b31f4
dnl # specified domains appear to be sent from mydomain.com
cvsdist 68b31f4
dnl #
cvsdist 68b31f4
dnl MASQUERADE_AS(`mydomain.com')dnl
cvsdist 68b31f4
dnl #
cvsdist 68b31f4
dnl # masquerade not just the headers, but the envelope as well
cvsdist 68b31f4
dnl #
cvsdist 68b31f4
dnl FEATURE(masquerade_envelope)dnl
cvsdist 68b31f4
dnl #
cvsdist 68b31f4
dnl # masquerade not just @mydomainalias.com, but @*.mydomainalias.com as well
cvsdist 68b31f4
dnl #
cvsdist 68b31f4
dnl FEATURE(masquerade_entire_domain)dnl
cvsdist 68b31f4
dnl #
cvsdist 68b31f4
dnl MASQUERADE_DOMAIN(localhost)dnl
cvsdist 68b31f4
dnl MASQUERADE_DOMAIN(localhost.localdomain)dnl
cvsdist 68b31f4
dnl MASQUERADE_DOMAIN(mydomainalias.com)dnl
cvsdist 68b31f4
dnl MASQUERADE_DOMAIN(mydomain.lan)dnl
cvsdist 53226c2
MAILER(smtp)dnl
cvsdist 53226c2
MAILER(procmail)dnl