divert(-1)dnl
include(`/usr/share/sendmail-cf/m4/cf.m4')dnl
VERSIONID(`setup for Red Hat Linux')dnl
OSTYPE(`linux')dnl
define(`confDEF_USER_ID',8:12)dnl
define(`STATUS_FILE',`/etc/mail/statistics')dnl
define(`confTRUSTED_USER',`smmsp')dnl
define(`confTRY_NULL_MX_LIST',true)dnl
define(`confDONT_PROBE_INTERFACES',true)dnl
define(`confSMTP_LOGIN_MSG',`is what you speak?  Feed me a mtfnpy!')dnl
define(`confALLOW_BOGUS_HELO',`False')dnl
define(`confMAX_DAEMON_CHILDREN', 10)dnl
define(`confPRIVACY_FLAGS',`authwarnings,novrfy,noexpn,restrictqrun,needmailhelo')dnl
define(`confAUTH_OPTIONS',`A p')dnl
define(`confBAD_RCPT_THROTTLE',`1')dnl
define(`confCONNECTION_RATE_THROTTLE',`1')dnl
define(`confCONNECTION_RATE_WINDOW_SIZE',`15m')dnl
define(`PROCMAIL_MAILER_PATH',`/usr/bin/procmail')dnl
define(`UUCP_MAILER_MAX',`2000000')dnl
TRUST_AUTH_MECH(`EXTERNAL LOGIN PLAIN')dnl
define(`confAUTH_MECHANISMS',`EXTERNAL LOGIN PLAIN')dnl

dnl where to store certificates under
define(`CERT_DIR',`/etc/certificates')dnl

dnl Certificate Authority file & directory (for verifying other sites)
define(`confCACERT',`CERT_DIR/cacert.pem')dnl
define(`confCACERT_PATH',`/usr/share/ssl/certs')dnl

dnl local server certificate and keyfiles (to certify this host)
dnl key file should be mode 0400 for security reasons
define(`confSERVER_CERT',`CERT_DIR/web/public/xabean.com-cert.pem')dnl
define(`confCLIENT_CERT',`CERT_DIR/web/public/xabean.com-cert.pem')dnl
define(`confSERVER_KEY',`CERT_DIR/web/private/xabean.com-cert.pem')dnl
define(`confCLIENT_KEY',`CERT_DIR/web/private/xabean.com-cert.pem')dnl
CLIENT_OPTIONS(`Family=inet, Address=67.18.92.146, M=S')

define(`confDONT_BLAME_SENDMAIL',`groupreadablekeyfile')dnl

dnl custom Received: header
define(`confRECEIVED_HEADER',`$?sfrom $s $.$?_($?s$|from $.$_)
        $.$?{auth_type}(authenticated$?{auth_ssf} as=${auth_authen} bits=${auth_ssf}$.)
        $.by $j (envelope-from $f) ($v/$Z)$?r with $r$. id $i$?{tls_version}
        (version=${tls_version} cipher=${cipher} bits=${cipher_bits} verify=${verify})$.$?u
        HDDVD:09f911029d74e35bd84156c5635688c0 mtfnpy:mtfnpy
        for $u; $|;
        $.$b')dnl

dnl sendmail timeouts
define(`confTO_CONNECT',`2m')dnl
define(`confTO_IDENT',`0')dnl
define(`confTO_ICONNECT',`12')dnl
define(`confTO_HELO',`2m')dnl
define(`confTO_MAIL',`2m')dnl
define(`confTO_RCPT',`2m')dnl
define(`confTO_DATAINIT',`2m')dnl
define(`confTO_DATABLOCK',`2m')dnl
define(`confTO_DATAFINAL',`1m')dnl
define(`confTO_RSET',`2m')dnl
define(`confTO_QUIT',`2m')dnl
define(`confTO_MISC',`2m')dnl
define(`confTO_COMMAND',`2m')dnl
define(`confTO_STARTTLS',`2m')dnl

dnl log levels
define(`confLOG_LEVEL',`14')dnl
define(`confMILTER_LOG_LEVEL',`8')dnl

dnl milter options
define(`confMILTER_MACROS_CONNECT',`t, b, j, _, {daemon_name}, {if_name}, {if_addr}')dnl
define(`confMILTER_MACROS_HELO',`s, {tls_version}, {cipher}, {cipher_bits}, {cert_subject}, {cert_issuer}, {verify}')dnl
define(`confMILTER_MACROS_ENVFROM',`i, {auth_authen}')
define(`confMILTER_MACROS_ENVRCPT',`{greylist}')
define(`confMILTER_MACROS_EOM',`{msg_id}, {mail_addr}, {rcpt_addr}, i')


dnl turn off default entry for MSA -- we create our own later
FEATURE(`no_default_msa')dnl

FEATURE(`smrsh',`/usr/sbin/smrsh')dnl
FEATURE(`mailertable',`hash -o /etc/mail/mailertable.db')dnl
FEATURE(`virtusertable',`hash -o /etc/mail/virtusertable.db')dnl
FEATURE(`redirect')dnl
FEATURE(`always_add_domain')dnl
FEATURE(`use_cw_file')dnl
FEATURE(`use_ct_file')dnl
FEATURE(`generics_entire_domain')dnl
FEATURE(`genericstable',`hash -o /etc/mail/genericstable.db')dnl
FEATURE(`local_procmail',`',`procmail -t -Y -a $h -d $u')dnl
FEATURE(`authinfo',`hash -T -o /etc/mail/authinfo.db')dnl
FEATURE(`access_db',`hash -T /etc/mail/access.db')dnl
FEATURE(`blacklist_recipients')dnl
FEATURE(`greet_pause',5000)dnl
FEATURE(`queuegroup')dnl
GENERICS_DOMAIN_FILE(`/etc/mail/generics-domains')dnl
EXPOSED_USER(`root')dnl
define(`confDOMAIN_NAME',`mail.xabean.com')dnl


dnl Add some local config tweaks, mostly headers and rules
LOCAL_CONFIG
HX-HD-DVD-Key: 09f911029d74e35bd84156c5635688c0 (blow me MPAA)
HX-Envelope-From: $g
HX-Envelope-To: $u
HX-Quarantine: ${quarantine}
HX-Client-Addr: ${client_addr}
HX-mtfnpy: !!MTFNPY!!

dnl ssl verify
LOCAL_RULESETS
SLocal_check_rcpt
R$*	$: $&{verify}
ROK	$# OK

LOCAL_DOMAIN(`xabean.com')dnl

FEATURE(`allmasquerade')dnl
FEATURE(`masquerade_envelope')dnl
FEATURE(`masquerade_entire_domain')dnl
FEATURE(`delay_checks',`friend')dnl
FEATURE(`enhdnsbl',`bl.spamcop.net',`quarantine',`t')dnl
FEATURE(`enhdnsbl',`dnsbl.sorbs.net',`quarantine',`t')dnl
FEATURE(`enhdnsbl',`combined.njabl.org',`quarantine',`t')dnl
FEATURE(`enhdnsbl',`zen.spamhaus.org',`quarantine',`t')dnl
FEATURE(`enhdnsbl',`cbl.abuseat.org',`quarantine',`t')dnl
FEATURE(`enhdnsbl',`korea.services.net ',`quarantine',`t')dnl 
MAILER(`smtp')dnl
MAILER(`procmail')dnl
HACK(`perlsrs')dnl
HACK(`block_bad_helo')dnl
HACK(`check_msgid')dnl
INPUT_MAIL_FILTER(`greylist',`S=local:/var/run/milter-greylist.sock,T=S:5m;R:5m;E:5m')dnl
INPUT_MAIL_FILTER(`dk-verify',`S=unix:/var/run/dk-vrfy.sock, T=S:5m;R:5m;E:5m')dnl
INPUT_MAIL_FILTER(`sid-filter',`S=local:/var/run/sid-filter.sock, T=S:5m;R:5m;E:5m')dnl
INPUT_MAIL_FILTER(`spfmilter',`S=unix:/var/run/spfmilter/spfmilter.sock, T=S:8m;R:8m')
INPUT_MAIL_FILTER(`clamav',`S=unix:/var/clamav/clmilter.socket, T=S:5m;R:5m;E:5m')dnl
INPUT_MAIL_FILTER(`spamassassin',`S=unix:/var/run/spamass.sock, T=S:5m;R:5m;E:5m')dnl
INPUT_MAIL_FILTER(`dk-sign',`S=unix:/var/run/dk-sign.sock, T=S:5m;R:4m;E:5m')dnl
DAEMON_OPTIONS(`Port=smtp, Addr=67.18.92.146, Name=MTA,     InputMailFilters=greylist;dk-verify;spfmilter;sid-filter;spamassassin;clamav')dnl
DAEMON_OPTIONS(`Port=smtp, Addr=127.0.0.1, Name=LOCALMTA, InputMailFilter=dk-sign')dnl
DAEMON_OPTIONS(`Port=smtp, Addr=10.1.0.1, Name=VPNMTA, InputMailFilter=dk-sign')dnl
DAEMON_OPTIONS(`Port=smtps, Addr=67.18.92.146, Name=TLSMTA, M=sa, InputMailFilters=dk-sign')dnl
DAEMON_OPTIONS(`Port=smtps, Addr=10.1.0.1, Name=VPNTLSMTA, M=sa, InputMailFilters=dk-sign')dnl
DAEMON_OPTIONS(`Port=smtps, Addr=127.0.0.1, Name=LOCALTLSMTA, M=s, InputMailFilter=dk-sign')dnl