divert(-1) # # Original Version # ---------------- # http://www.Linux-Sec.net/Mail/etc.mail/sendmail.antispam.howto.txt # http://www.Linux-Sec.net/Mail/etc.mail/sendmail-8.12.5/sendmail-8.12.5.rbl.mc # http://www.Linux-Sec.net/Mail/etc.mail/sendmail-8.12.5/sendmail-8.12.5.check_local.mc # # # ------------------------------------------------------------------------ # This sendmail.mc file enables the sendmail-8.12.5 Built-in Spam Features # ------------------------------------------------------------------------ # - Ignore servers without proper reverse DNS # - Ignore those spammers listed in the RBLs # - Accept incoming email for "valid recipients" # # ----------------------------------------------- # This version REQUIRES check_local-5.0 # http://www.Linux-Sec.net/Mail/etc.mail/check_local.txt # ----------------------------------------------- # # # 27-Jun-02 amo Modified sendmail-8.12.5/cf/cf/generic-linux.mc w/ RBL checks + check_local-5.0 # # check_local macros are hack( "foo" ) # # # Un-resolved errors # ------------------ # sm-mta: .. : SYSERR(root): Unknown ruleset resolve_domain # SYSERR(root): Macro/class {mail_addr}: too many long names # # # # Copyright (c) 1998, 1999 Sendmail, Inc. and its suppliers. # All rights reserved. # Copyright (c) 1983 Eric P. Allman. All rights reserved. # Copyright (c) 1988, 1993 # The Regents of the University of California. All rights reserved. # # By using this file, you agree to the terms and conditions set # forth in the LICENSE file which can be found at the top level of # the sendmail distribution. # # # # This is a generic configuration file for Linux. # It has support for local and SMTP mail only. If you want to # customize it, copy it to a name appropriate for your environment # and do the modifications there. # # # divert(0)dnl VERSIONID(`$Id: 04-May-02 amo Modified sendmail-8.12.5 check_local-5 Exp $') OSTYPE(linux)dnl DOMAIN(generic)dnl dnl FEATURE(`use_ct_file') FEATURE(`use_cw_file') FEATURE(`redirect') FEATURE(`always_add_domain') dnl define(`LOCAL_MAILER_PATH', `/usr/bin/procmail')dnl FEATURE(`local_procmail') FEATURE(`domaintable') FEATURE(`genericstable') FEATURE(`virtusertable') FEATURE(`smrsh') dnl dnl -- manually fix Kaccess dnl FEATURE(`access_db', `hash -T /etc/mail/access')dnl FEATURE(`access_db') dnl dnl turn on in 8.12.5 ... mailertable, blacklist, delay_cheks, lookupdotdomain FEATURE(`mailertable') FEATURE(`blacklist_recipients') FEATURE(`delay_checks') FEATURE(`lookupdotdomain') dnl FEATURE(`compat_check') FEATURE(`authinfo') dnl define(`_QUIET_FREEWARE_')dnl dnl define(`confREJECT_MSG',`552 Spammer $&{client_addr} $&f Rejected by PostMaster@$j - check_mail or check_relay')dnl dnl define(`confCF_VERSION', `check_local-5')dnl define(`confSMTP_LOGIN_MSG', ``$j Sendmail 1.0/1.0; $b'') dnl dnl (`confPRIVACY_FLAGS', `authwarnings noexpn novrfy needmailhelo') define(`confPRIVACY_FLAGS', `authwarnings noexpn novrfy needmailhelo needexpnhelo needvrfyhelo noreceipts ') define(`confTO_IDENT',`0') dnl 0s dnl dnl define Trusted user ( Tmajordom ) for majordomo and for majordomo files dnl dnl define(`ALIAS_FILE',`/etc/mail/aliases, /usr/local/majordomo/majordomo.aliases') define(`confTRUSTED_USERS', `majordom') dnl dnl dnl ------------------------ dnl --- Spam Filter Stuff -- dnl ------------------------ dnl dnl friend should have one entry for postmaster FEATURE(`delay_checks', `friend') dnl dnl HACK(`check_localpart', `reg_no_nums', `no_num_domains', `REGNONUM')dnl dnl dnl dnl -- noticeably slows down sending of email if its checking the RBLs dnl HACK(`check_dnsbl')dnl dnl FEATURE(`enhdnsbl') FEATURE(`enhdnsbl', `or.orbl.org', `Spammer $&{client_addr} $&f rejected: see http://www.orbl.org/ (ORBL)') FEATURE(`enhdnsbl', `relays.ordb.org', `Spammer $&{client_addr} $&f rejected: see http://ordb.org/ (relays)') FEATURE(`enhdnsbl', `spamsites.relays.osirusoft.com', `Spammer $&{client_addr} $&f rejected by http://relays.osirusoft.com/ (spamsites)') FEATURE(`enhdnsbl', `spamhaus.relays.osirusoft.com', `Spammer $&{client_addr} $&f rejected by http://relays.osirusoft.com/ (spamhaus)') FEATURE(`enhdnsbl', `spews.relays.osirusoft.com', `Spammer $&{client_addr} $&f rejected by http://relays.osirusoft.com/ (spews)') dnl dnl dnl http://www.rfc-ignorant.org/how_to_domain.html - use dnsbl instead of rhsbl dnl FEATURE(enhdnsbl,`dsn.rfc-ignorant.org',`550 Spammer $&{client_addr} $&f rejected because you violate RFC 821/2505/2821') FEATURE(enhdnsbl,`postmaster.rfc-ignorant.org',`550 Spammer $&{client_addr} $&f rejected because your domain does not have a working PostMaster') dnl HACK(`check_dnsbl_end')dnl dnl dnl dnl dnl =============== Added check_local-5.0 =========================== dnl dnl http://www.Linux-Sec.net/Mail/etc.mail/check_local.txt dnl dnl dnl check_local definition of headerchecks ( option already turned on ) dnl -- no effect in 8.12.3 dnl -- define(_HC_SWITCH_) dnl -- define(`_REGEX_LOCALNUMS_')dnl dnl -- define(`_CHECK_HEADER_RECEIVED_')dnl dnl -- define(`_CHECK_HEADER_FROM_')dnl dnl -- define(`_CHECK_MESSAGE_ID_')dnl dnl HACK(check_header, `Received', `HRC,,,HRCCNT', `', `parse_received', `+header', `!general', `', `1', `', `"552 Spammer $&{client_addr} $&f rejected - Bad Received"')dnl HACK(check_header, `Message-Id', `HMI,HMIPARSE,HMIDNS,HMICNT', `test_message_id', `parse_message_id', `+header', `!general', `dns_message_id', `1', `1', `"552 spmmer $&{client_addr} $&f rejected - Message Id corrupt"')dnl HACK(check_header, `From', `HFR', `', `parse_address', `+header', `+all', `', `', `', `"552 Spammer $&{client_addr} $&f rejected - bad From"')dnl HACK(check_header, `To', `HFR', `', `parse_address', `+header', `+all', `', `', `', `"552 Spammer $&{client_addr} $&f rejected - bad To"')dnl HACK(check_header, `Reply-To', `HFR', `', `parse_address', `+header', `+all', `', `', `', `"552 Spammer $&{client_addr} $&f rejected - Bad Reply-To"')dnl HACK(check_header, `Sender', `HFR', `', `parse_address', `+header', `+all', `', `', `', `"552 Spammer $&{client_addr} $&f rejected - Bad Sender"')dnl HACK(check_header, `Cc', `HFR', `', `parse_address', `+header', `+all', `', `', `', `"552 Spammer $&{client_addr} $&f rejected - Bad Cc"')dnl HACK(check_header_end, `XSPAM')dnl dnl dnl HACK(check_unknown_header, `/etc/mail/known-headers')dnl dnl dnl HACK(check_local_patterns)dnl HACK(check_local_tester)dnl dnl dnl -- define(`_MD2NAME_') dnl -- define(`_ACCEPT_MAIL_FROM_OK_') dnl -- define(`_CLIENT_MUST_RESOLVE_') dnl -- define(`_CHECK_REGEX_') dnl dnl dnl HACK(check_local) HACK(check_local, `CREL,CMD2N,CMFOK,CBASM,CDNSBL,CDREG,CRES,CMREG,CCRHSBL,CFRHSBL,CBFROM', `XSPAM') dnl dnl dnl dnl =============== Added linux-sec.m4 header_check =========================== dnl dnl http://quanta.kyunghee.ac.kr/~dacapo/sendmail/rulesets/quanta_spam-killer_REGEX.m4 dnl http://www.Linux-Sec.net/Mail/etc.mail/linux-sec.m4 ( aka header_chk.m4 modified from above quanta ) dnl HACK(`linux-sec')dnl # modify quanta.m4 and check more headers dnl dnl dnl dnl Mailers dnl MAILER(local)dnl MAILER(smtp)dnl dnl dnl MAILER(uucp)dnl # # # end of file