# Main exim's config ifdef(`confM4_DIR', `', `define(`confM4_DIR', `../m4')') ifdef(`confACLS_DIR', `', `define(`confACLS_DIR', `.')') ifdef(`confFEATURES_DIR', `', `define(`confFEATURES_DIR', `.')') ifdef(`confDELIVERIES_DIR', `', `define(`confDELIVERIES_DIR', `.')') ifdef(`confSITE_DIR', `', `define(`confSITE_DIR', `.')') include(confFEATURES_DIR`/cfhead.m4')dnl include(confM4_DIR`/conf.default')dnl include(confSITE_DIR/`conf')dnl define(`SECTION', `MAIN')dnl ifdef(`confCONFDIR', `dnl', `dnl errprint(`*** ERROR: confCONFDIR variable required ')') CONFDIR=confCONFDIR ifdef(`confPERL', `ifelse(len(X`'confPERL), `1', `dnl', `dnl perl_startup = do "confPERL" ')') ifdef(`confMYSQL', `ifelse(len(X`'confMYSQL), `1', `dnl', `dnl hide mysql_servers = confMYSQL ')') log_selector = +smtp_connection +smtp_protocol_error +smtp_syntax_error \ +lost_incoming_connection +connection_reject +dnslist_defer +host_lookup_failed \ -retry_defer -skip_delivery -queue_run -rejected_header hostlist relay_from_hosts = localhost : CONFDIR/hosts-relayfrom ifdef(`confETRN_ENABLE', `ifelse(confETRN_ENABLE, `NO', `dnl', `dnl hostlist trusted_hosts = localhost : CONFDIR/hosts-trusted ')') ifdef(`confWHITE_LIST_RELAYS', `ifelse(confWHITE_LIST_RELAYS, `NO', `', ` hostlist relay_white_list = confWHITE_LIST_RELAYS ')') ifdef(`confSMTP_SERIALIZE_HOSTS', `ifelse(confSMTP_SERIALIZE_HOSTS, `NO', `dnl', `dnl hostlist serialize_hosts = CONFDIR/hosts-serialize ')') domainlist local_domains = lsearch;CONFDIR/domains-local define(`confDOMAINS_ABUSE', `')dnl ifdef(`confSECONDARY_RELAY', `ifelse(confSECONDARY_RELAY, `NO', `dnl', `dnl #domainlist relay_to_domains = lsearch;CONFDIR/domains-local : lsearch;CONFDIR/domains-relayto domainlist relay_to_domains = lsearch;CONFDIR/domains-relayto define(`confDOMAINS_ABUSE', ` : +relay_to_domains')dnl ')') ifdef(`confMAILERTABLE', `ifelse(confMAILERTABLE, `NO', `dnl', `dnl DELIVERY(`mailertable')dnl ')') ifdef(`confGREYLIST_DBM', `ifelse(confGREYLIST_DBM, `NO', `dnl', `dnl FEATURE(`greylist-dbm')dnl ')') ifdef(`confSMTP_AUTH', `ifelse(confSMTP_AUTH, `NO', `dnl', `dnl FEATURE(`auth')dnl ')') ifdef(`confSMTP_AUTH_CLIENT', `ifelse(confSMTP_AUTH_CLIENT, `NO', `dnl', `dnl FEATURE(`auth_client')dnl ')') helo_try_verify_hosts = ! +relay_from_hosts helo_accept_junk_hosts = +relay_from_hosts ifdef(`confCHECK_RELAY_DROPPED', `ifelse(confCHECK_RELAY_DROPPED, `NO', `dnl', `dnl ACL(`check_relay_dropped')dnl ')') ifdef(`confCHECK_HELO_FQDN', `ifelse(confCHECK_HELO_FQDN, `NO', `dnl', `dnl ACL(`check_helo_fqdn')dnl ')') ifdef(`confCHECK_RELAY_BLACKLIST', `ifelse(confCHECK_RELAY_BLACKLIST, `NO', `dnl', `dnl ACL(`check_relay_blacklist')dnl ')') ifdef(`confCHECK_RELAY_DIALUP', `ifelse(confCHECK_RELAY_DIALUP, `NO', `dnl', `dnl ACL(`check_relay_dialup')dnl ')') ifelse(confDNSBL0_NAME, `confDNSBL0_NAME', ` ifdef(`confCHECK_RELAY_DNSBL', `ifelse(confCHECK_RELAY_DNSBL, `NO', `dnl', `dnl ACL(`check_relay_dnsbl') ')') ', ` FEATURE(`dnsbl')dnl ') ifdef(`confVERIFY_SENDER', `ifelse(confVERIFY_SENDER, `NO', `dnl', `dnl ACL(`verify_sender')dnl ')') ifdef(`confCHECK_MAIL_DOMAIN', `ifelse(confCHECK_MAIL_DOMAIN, `IGNORE', `dnl ACL(`check_mail_domain')dnl ')') ifelse(confRFC_LIST0_NAME, `confRFC_LIST0_NAME', ` ifdef(`confCHECK_RFC_IGNORANT', `ifelse(confCHECK_RFC_IGNORANT, `NO', `dnl', `dnl ACL(`check_rfc_ignorant')dnl ')') ', ` FEATURE(`rfc_ignorant_list')dnl ') ifdef(`confCHECK_OPEN_PROXY', `ifelse(confCHECK_OPEN_PROXY, `NO', `dnl', `dnl ACL(`check_open_proxy')dnl ')') ifdef(`confEXCHANGE_ROUTERS', `ifelse(confEXCHANGE_ROUTERS, `NO', `dnl', `dnl FEATURE(`exchange')dnl ')') ifdef(`confDOMINO_ROUTERS', `ifelse(confDOMINO_ROUTERS, `NO', `dnl', `dnl FEATURE(`domino')dnl ')') ifelse_strstr(confDELIVERY_TO, `CYRUS', `dnl DELIVERY(`cyrus')dnl ') ifdef(`confVIRTUSERTABLE', `ifelse(confVIRTUSERTABLE, `NO', `dnl', `dnl FEATURE(`virtusertable')dnl ')') ifdef(`confDOMAIN_LITERALS', `ifelse(confDOMAIN_LITERALS, `NO', `dnl', `dnl FEATURE(`domain_literals')dnl ')') ifdef(`confCHECK_FAKE_INTERNAL', `ifelse(confCHECK_FAKE_INTERNAL, `NO', `dnl', `dnl ACL(`check_fake_internal')dnl ')') ifdef(`confCHECK_HELO_UNDERSCORE', `ifelse(confCHECK_HELO_UNDERSCORE, `NO', `dnl', `dnl ACL(`check_helo_underscore')dnl ')') ifdef(`confLOCAL_INTERFACES', `ifelse(len(X`'confLOCAL_INTERFACES), `1', `dnl', `dnl # default with IPv4 support: # local_interfaces = 0.0.0.0 # default with IPv4 & IPv6 support: # local_interfaces = <; ::0 ; 0.0.0.0 local_interfaces = confLOCAL_INTERFACES ')') ifdef(`confSMTP_BANNER',`',`define(`confSMTP_BANNER',`')') ifelse(len(X`'confSMTP_BANNER), `1', ` ifelse(confANONYM_BANNER_HIDE_MTA_INFO, `NO',`',` smtp_banner = $primary_hostname ESMTP ifelse_strstr(confANONYM_BANNER_HIDE_MTA_INFO, `ALL',`daemon',`ifelse_strstr(confANONYM_BANNER_HIDE_MTA_INFO, `MTA',`daemon',`Exim`'ifelse_strstr(confANONYM_BANNER_HIDE_MTA_INFO, `VERSION',` daemon',` $version_number')')`'ifelse_strstr(confANONYM_BANNER_HIDE_MTA_INFO, `DATE',`',` $tod_full')') ') ', ` smtp_banner = confSMTP_BANNER ') #received_header_text = Received: \ # ${if def:sender_rcvhost {from $sender_rcvhost\n\t}\ # {${if def:sender_ident {from $sender_ident }}\ # ${if def:sender_helo_name {(helo=$sender_helo_name)\n\t}}}}\ # by $primary_hostname \ # ${if def:received_protocol {with $received_protocol}} \ # ${if def:tls_cipher {($tls_cipher)\n\t}}\ # (Exim $version_number (FreeBSD))\n\ # \tid $message_id\ # ${if def:received_for {\n\tfor $received_for}} received_header_text = Received: \ ${if def:sender_rcvhost \ ifelse_strstr(confANONYM_RCVD_HIDE_HOST_INFO, `YES', `dnl # {from ${if eq{$acl_c9}{anonym}{localhost ([127.0.0.1] helo=localhost)}{$sender_rcvhost}}\n}\ {from ${if eq{$acl_c9}{anonym}{localhost ([127.0.0.1])}{$sender_rcvhost}}\n}\ ', `dnl {from $sender_rcvhost\n}\ ')dnl {${if def:sender_ident {from $sender_ident }}\ ${if def:sender_helo_name {(helo=$sender_helo_name)\n}}}}\ \tby $primary_hostname \ ${if def:received_protocol {with $received_protocol}} \ ${if def:tls_cipher {($tls_cipher)\n\t}}\ ifelse_strstr(confANONYM_RCVD_HIDE_MTA_INFO, `ALL', `', `dnl (Exim`'ifelse_strstr(confANONYM_RCVD_HIDE_MTA_INFO, `VERSION', `', ` $version_number')`'ifelse_strstr(confANONYM_RCVD_HIDE_MTA_INFO, `OS', `', ` (FreeBSD)'))\n\t\ ')dnl id $message_id\ ${if def:received_for {\n\tfor $received_for}} acl_smtp_connect = acl_check_connect ifdef(`confETRN_ENABLE', `ifelse(confETRN_ENABLE, `NO', `dnl', `dnl acl_smtp_etrn = acl_check_etrn ')') acl_smtp_auth = acl_check_auth acl_smtp_mail = acl_check_mail acl_smtp_rcpt = acl_check_rcpt acl_smtp_mime = acl_check_mime acl_smtp_data = acl_check_data ifdef(`confCONFIGURE_GENERAL', `ifelse(confCONFIGURE_GENERAL, `NO', `dnl', `dnl include(confCONFIGURE_GENERAL)dnl ')') ifdef(`confQUALIFY_DOMAIN', `dnl qualify_domain = confQUALIFY_DOMAIN ', `errprint(`*** ERROR: confQUALIFY_DOMAIN must be specified ')') # qualify_recipient = ifdef(`confMESSAGE_SIZE_LIMIT', `ifelse(len(X`'confMESSAGE_SIZE_LIMIT), `1', `dnl', `dnl ifelse(confMESSAGE_SIZE_LIMIT, `0', `dnl', `dnl message_size_limit = confMESSAGE_SIZE_LIMIT ')')') #return_size_limit = 10K bounce_return_size_limit = 10K ifdef(`confEXIM_USER', `',`define(`confEXIM_USER',`mailnull')') ifdef(`confEXIM_GROUP',`',`define(`confEXIM_GROUP',`mail')') exim_user = confEXIM_USER exim_group = confEXIM_GROUP # never_users = root ifdef(`confTRUSTED_USERS', `trusted_users = confTRUSTED_USERS') ifdef(`confTRUSTED_GROUPS', `trusted_groups = confTRUSTED_GROUPS') ifelse(len(X`'confSYSTEM_FILTER), `1', `dnl', `dnl FEATURE(`system_filter')dnl ') accept_8bitmime = true # turn off ident requests rfc1413_hosts = : rfc1413_query_timeout = 0s smtp_return_error_details = true host_lookup = * ifdef(`confIGNORE_BOUNCE_ERRORS_AFTER', `ifelse(len(X`'confIGNORE_BOUNCE_ERRORS_AFTER), `1', ` ignore_bounce_errors_after = 2d ', ` ignore_bounce_errors_after = confIGNORE_BOUNCE_ERRORS_AFTER ')') ifdef(`confTIMEOUT_FROZEN_AFTER', `ifelse(len(X`'confTIMEOUT_FROZEN_AFTER), `1', ` timeout_frozen_after = 7d ', ` timeout_frozen_after = confTIMEOUT_FROZEN_AFTER ')') ifdef(`confSTARTTLS', `ifelse(confSTARTTLS, `NO', `dnl', `dnl FEATURE(`starttls')dnl ')') ifdef(`confMESSAGE_ID_HEADER_ADD', `ifelse(confMESSAGE_ID_HEADER_ADD, `NO', `dnl', `dnl FEATURE(`add_message_id')dnl ')') ifdef(`confMAILMAN', `ifelse(confMAILMAN, `NO', `dnl', `dnl FEATURE(`mailman')dnl ')') ifdef(`confANTIVIRUS0_ACT', `dnl av_scanner = $acl_m0 ') ifdef(`confSPAMASSASSIN', `ifelse(confSPAMASSASSIN, `NO', `dnl', `dnl FEATURE(`spamassassin')dnl ')') ifdef(`confSRS', `ifelse(confSRS, `NO', `dnl', `dnl FEATURE(`srs')dnl ')') ifdef(`confFAKE_REJECT',`',`define(`confFAKE_REJECT', `NO')') ifdef(`confCHECK_FILE_EXT', `ifelse(confCHECK_FILE_EXT, `NO', `dnl', `dnl ACL(`check_ext')dnl ')') dns_check_names_pattern = (?i)^(?>(?(1)\.|())[^\W](?>[a-z0-9-]*[^\W])?)+$ # Access Lists begin acl acl_check_connect: define(`SECTION', `ACL_CHECK_CONNECT')dnl ifelse_strstr(confANONYM_RCVD_HIDE_HOST_INFO, `YES', `dnl warn set acl_c9 = hosts = +relay_from_hosts set acl_c9 = anonym ') ifdef(`confCHECK_RELAY_DROPPED', `ifelse(confCHECK_RELAY_DROPPED, `NO', `dnl', `dnl ACL(`check_relay_dropped')dnl ')') define(`confRESOLVE_PTR_RECORD', `0') ifdef(`confCHECK_RELAY_FORGED', `ifelse(confCHECK_RELAY_FORGED, `NO', `', `define(`confRESOLVE_PTR_RECORD', `1')')') ifdef(`confCHECK_RELAY_RESOLVE', `ifelse(confCHECK_RELAY_RESOLVE, `NO', `', `define(`confRESOLVE_PTR_RECORD', `1')')') ifdef(`confCHECK_DIGITS', `ifelse(confCHECK_DIGITS, `NO', `', `define(`confRESOLVE_PTR_RECORD', `1')')') ifdef(`confCHECK_RELAY_BLACKLIST', `ifelse(confCHECK_RELAY_BLACKLIST, `NO', `', `define(`confRESOLVE_PTR_RECORD', `1')')') ifdef(`confCHECK_RELAY_DIALUP', `ifelse(confCHECK_RELAY_DIALUP, `NO', `', `define(`confRESOLVE_PTR_RECORD', `1')')') ifdef(`confANTIVIRUS_0_NAME', `define(`confRESOLVE_PTR_RECORD', `1')') ifelse(confRESOLVE_PTR_RECORD, `1', ` warn set acl_c7 = condition = ${if eq{$sender_host_name}{}{yes}{no}} condition = ${if eq{$host_lookup_failed}{1}{yes}{no}} set acl_c7 = ${lookup dnsdb{ptr=$sender_host_address}} ') accept ifdef(`confETRN_ENABLE', `ifelse(confETRN_ENABLE, `NO', `dnl', `dnl FEATURE(`etrn')dnl ')') acl_check_auth: define(`SECTION', `ACL_CHECK_AUTH')dnl ifdef(`confDISABLE_AUTH_WITHOUT_TLS', `ifelse(confDISABLE_AUTH_WITHOUT_TLS, `NO', `dnl', `dnl ACL(`disable_auth_without_tls')dnl ')') accept acl_check_mail: define(`SECTION', `ACL_CHECK_MAIL')dnl warn set acl_m9 = no_skip ifdef(`confWHITE_LIST_RELAYS', `ifelse(confWHITE_LIST_RELAYS, `NO', `', ` accept hosts = +relay_white_list ')') ifdef(`confWHITE_LIST_SENDERS', `ifelse(confWHITE_LIST_SENDERS, `NO', `', ` accept senders = @@wildlsearch;CONFDIR/senders-whitelist ')') ifdef(`confSPAMASSASSIN', `ifelse(confSPAMASSASSIN, `NO', `dnl', `dnl FEATURE(`spamassassin')dnl ')') ifdef(`confCHECK_MAIL_8BIT', `ifelse(confCHECK_MAIL_8BIT, `NO', `dnl', `dnl ACL(`check_mail_8bit')dnl ')') ifdef(`confCHECK_RELAY_RESOLVE', `ifelse(confCHECK_RELAY_RESOLVE, `NO', `dnl', `dnl ifelse_strstr(confCHECK_RELAY_RESOLVE, `MAIL', `dnl ACL(`check_relay_resolve')dnl ',` ifelse_strstr(confCHECK_RELAY_RESOLVE, `RCPT', `', ` define(`confCHECK_RELAY_RESOLVE', confCHECK_RELAY_RESOLVE` RCPT') ') ')')') ifdef(`confCHECK_FAKE_INTERNAL', `ifelse(confCHECK_FAKE_INTERNAL, `NO', `dnl', `dnl ACL(`check_fake_internal')dnl ') dnl ') dnl ifdef(`confCHECK_MAIL_DOMAIN', `ifelse(confCHECK_MAIL_DOMAIN, `NO', `dnl', `dnl ACL(`check_mail_domain')dnl ')') ifdef(`confCHECK_NUMERIC_MAILBOX', `ifelse(confCHECK_NUMERIC_MAILBOX, `NO', `dnl', `dnl ACL(`check_numeric_mailboxes')dnl ')') accept acl_check_rcpt: define(`SECTION', `ACL_CHECK_RCPT')dnl ifdef(`confOPTIONAL_REJECT', `ifelse(confOPTIONAL_REJECT, `NO', `dnl', `dnl warn set acl_c6 = scores=0 log_message= ')') # Проверка существования получателей ifdef(`confCHECK_DICT_ATTACK', `ifelse(confCHECK_DICT_ATTACK, `NO', `dnl', `dnl ACL(`check_dict_attack')dnl ')') ifdef(`confCHECK_RCPT_INVALID', `ifelse(confCHECK_RCPT_INVALID, `NO', `dnl', `dnl ACL(`check_rcpt_invalid')dnl ')') ifdef(`confVIRTUSERTABLE', `ifelse(confVIRTUSERTABLE, `NO', `dnl', `dnl FEATURE(`virtusertable')dnl ')') ifdef(`confDOMAIN_LITERALS', `ifelse(confDOMAIN_LITERALS, `NO', `dnl', `dnl FEATURE(`domain_literals')dnl ')') # Проверка существования получателей из локальных доменов deny domains = +local_domains message = User unknown log_message = User unknown ! verify = recipient ifdef(`confEXCHANGE_ROUTERS', `ifelse(confEXCHANGE_ROUTERS, `NO', `dnl', `dnl FEATURE(`exchange')dnl ')') ifdef(`confDOMINO_ROUTERS', `ifelse(confDOMINO_ROUTERS, `NO', `dnl', `dnl FEATURE(`domino')dnl ')') ifelse_strstr(confDELIVERY_TO, `CYRUS', `dnl DELIVERY(`cyrus')dnl ') ifdef(`confCHECK_RCPT_INCOMING_ONLY', `ifelse(confCHECK_RCPT_INCOMING_ONLY, `NO', `dnl', `dnl ACL(`check_rcpt_incoming_only')dnl ')') ifdef(`confMAILERTABLE', `ifelse(confMAILERTABLE, `NO', `dnl', `dnl DELIVERY(`mailertable')dnl ')') ifdef(`confSPAMASSASSIN', `ifelse(confSPAMASSASSIN, `NO', `dnl', `dnl FEATURE(`spamassassin')dnl ')') warn set acl_m0 = warn hosts = : set acl_m0 = accept warn hosts = +relay_from_hosts set acl_m0 = accept warn authenticated = * set acl_m0 = accept ifdef(`confWHITE_LIST_RELAYS', `ifelse(confWHITE_LIST_RELAYS, `NO', `', ` warn hosts = +relay_white_list domains = +local_domains ifdef(`confSECONDARY_RELAY', `ifelse(confSECONDARY_RELAY, `NO', `', ` : +relay_to_domains')') set acl_m9 = white_list_relays set acl_m0 = accept ')') ifdef(`confWHITE_LIST_SENDERS', `ifelse(confWHITE_LIST_SENDERS, `NO', `', ` warn senders = @@wildlsearch;CONFDIR/senders-whitelist domains = +local_domains ifdef(`confSECONDARY_RELAY', `ifelse(confSECONDARY_RELAY, `NO', `', ` : +relay_to_domains')') set acl_m9 = white_list_senders set acl_m0 = accept ')') ifdef(`confSECONDARY_RELAY', `ifelse(confSECONDARY_RELAY, `NO', `dnl', `dnl define(`SECTION', `ACL_CHECK_RCPT_TOP')dnl ACL(`verify_recipient')dnl define(`SECTION', `ACL_CHECK_RCPT')dnl ')') ifdef(`confRECIPIENTS_SPAM_FRIENDS', `ifelse(confRECIPIENTS_SPAM_FRIENDS, `NO', `dnl warn domains = +local_domains confDOMAINS_ABUSE local_parts = postmaster : abuse set acl_m9 = abuse_or_postmaster ', `dnl warn domains = +local_domains confDOMAINS_ABUSE recipients = @@wildlsearch;CONFDIR/recipients_spam_friends ')') FEATURE(`antivirus', ` warn condition = ${if eq{$acl_m0}{accept}{yes}{no}}') accept condition = ${if eq{$acl_m0}{accept}{yes}{no}} ifdef(`confGREYLIST_DBM', `ifelse(confGREYLIST_DBM, `NO', `dnl', `dnl define(`SECTION', `ACL_CHECK_RCPT_TOP')dnl FEATURE(`greylist-dbm')dnl define(`SECTION', `ACL_CHECK_RCPT')dnl ')') # Проверка корректности почтового ящика получателя deny local_parts = ^.*[@%!/|] : ^\\. # Проверка HELO/EHLO: ifdef(`confCHECK_HELO_OWN', `ifelse(confCHECK_HELO_OWN, `NO', `dnl', `dnl ACL(`check_helo_own')dnl ')') ifdef(`confCHECK_HELO_BLACKLIST', `ifelse(confCHECK_HELO_BLACKLIST, `NO', `dnl', `dnl ACL(`check_helo_blacklist')dnl ')') ifdef(`confCHECK_HELO_MISCONFIGURED', `ifelse(confCHECK_HELO_MISCONFIGURED, `NO', `dnl', `dnl ACL(`check_helo_misconfigured')dnl ')') ifdef(`confCHECK_HELO_IP', `ifelse(confCHECK_HELO_IP, `NO', `dnl', `dnl ACL(`check_helo_ip')dnl ')') ifdef(`confCHECK_HELO_UNDERSCORE', `ifelse(confCHECK_HELO_UNDERSCORE, `NO', `dnl', `dnl ACL(`check_helo_underscore')dnl ')') ifdef(`confCHECK_HELO_FORGED', `ifelse(confCHECK_HELO_FORGED, `NO', `dnl', `dnl ACL(`check_helo_forged')dnl ')') ifdef(`confCHECK_HELO_FORGED', `ifelse(confCHECK_HELO_FORGED, `NO', `dnl', `dnl ACL(`check_helo_forged')dnl ')') ifdef(`confCHECK_HELO_DIALUP', `ifelse(confCHECK_HELO_DIALUP, `NO', `dnl', `dnl ACL(`check_helo_dialup')dnl ')') ifdef(`confCHECK_HELO_FQDN', `ifelse(confCHECK_HELO_FQDN, `NO', `dnl', `dnl ACL(`check_helo_fqdn')dnl ')') ifdef(`confVERIFY_HELO', `ifelse(confVERIFY_HELO, `NO', `dnl', `dnl # warn on verify helo warn ! verify = helo log_message = verify HELO ($sender_helo_name) ')') ifdef(`confRECIPIENTS_SPAM_FRIENDS', `ifelse(confRECIPIENTS_SPAM_FRIENDS, `NO', `dnl FEATURE(`antivirus', ` warn domains = +local_domains confDOMAINS_ABUSE local_parts = postmaster : abuse set acl_m9 = abuse_or_postmaster') # Прием почты для abuse адресов accept domains = +local_domains confDOMAINS_ABUSE local_parts = postmaster : abuse set acl_m9 = abuse_or_postmaster ', `dnl FEATURE(`antivirus', ` warn domains = +local_domains confDOMAINS_ABUSE recipients = @@wildlsearch;CONFDIR/recipients_spam_friends') # Прием почты для abuse адресов и spam friend-ов accept domains = +local_domains confDOMAINS_ABUSE recipients = @@wildlsearch;CONFDIR/recipients_spam_friends set acl_m9 = abuse_or_postmaster ')') ifdef(`confMTA_MARK_ENABLE', `ifelse(confMTA_MARK_ENABLE, `NO', `dnl', `dnl FEATURE(`mtamark')dnl ')') ifdef(`confSPF', `ifelse(confSPF, `NO', `dnl', `dnl FEATURE(`spf')dnl ')') ifdef(`confSRS', `ifelse(confSRS, `NO', `dnl', `dnl FEATURE(`srs')dnl ')') ifdef(`confCHECK_DSN_RCPT_COUNT', `ifelse(confCHECK_DSN_RCPT_COUNT, `NO', `dnl', `dnl ACL(`check_dsn_rcpt_count')dnl ')') ifdef(`confCHECK_COMPAT', `ifelse(confCHECK_COMPAT, `NO', `dnl', `dnl ACL(`check_compat')dnl ')') ifdef(`confCHECK_RCPT_BLACKLIST', `ifelse(confCHECK_RCPT_BLACKLIST, `NO', `dnl', `dnl ACL(`check_rcpt_blacklist')dnl ')') ifdef(`confCHECK_MAIL_BLACKLIST', `ifelse(confCHECK_MAIL_BLACKLIST, `NO', `dnl', `dnl ACL(`check_mail_blacklist')dnl ')') ifdef(`confCHECK_RELAY_BLACKLIST', `ifelse(confCHECK_RELAY_BLACKLIST, `NO', `dnl', `dnl ACL(`check_relay_blacklist')dnl ')') ifdef(`confCHECK_FAKE_INTERNAL', `ifelse(confCHECK_FAKE_INTERNAL, `NO', `dnl', `dnl ACL(`check_fake_internal')dnl ')') ifdef(`confCHECK_FAKE_LOCAL', `ifelse(confCHECK_FAKE_LOCAL, `NO', `dnl', `dnl ACL(`check_fake_local')dnl ')') ifdef(`confCHECK_RELAY_DIALUP', `ifelse(confCHECK_RELAY_DIALUP, `NO', `dnl', `dnl ACL(`check_relay_dialup')dnl ')') ifdef(`confCHECK_RELAY_RESOLVE', `ifelse(confCHECK_RELAY_RESOLVE, `NO', `dnl', `dnl ifelse_strstr(confCHECK_RELAY_RESOLVE, `RCPT', `dnl ACL(`check_relay_resolve')dnl ')')') ifdef(`confCHECK_SENDER_MAILBOX', `ifelse(confCHECK_SENDER_MAILBOX, `NO', `dnl', `dnl ACL(`check_sender_mailbox')dnl ')') ifdef(`confCHECK_DIGITS', `ifelse(confCHECK_DIGITS, `NO', `dnl', `dnl ACL(`check_digits')dnl ')') ifdef(`confVERIFY_SENDER', `ifelse(confVERIFY_SENDER, `NO', `dnl', `dnl ACL(`verify_sender')dnl ')') ifelse(confDNSBL0_NAME, `confDNSBL0_NAME', ` ifdef(`confCHECK_RELAY_DNSBL', `ifelse(confCHECK_RELAY_DNSBL, `NO', `dnl', `dnl ACL(`check_relay_dnsbl') ')') ', ` FEATURE(`dnsbl')dnl ') ifdef(`confCHECK_NUMERIC_MAILBOX', `ifelse(confCHECK_NUMERIC_MAILBOX, `NO', `dnl', `dnl ACL(`check_numeric_mailboxes')dnl ')') ifdef(`confCHECK_OPEN_PROXY', `ifelse(confCHECK_OPEN_PROXY, `NO', `dnl', `dnl ACL(`check_open_proxy')dnl ')') ifelse(confRFC_LIST0_NAME, `confRFC_LIST0_NAME', ` ifdef(`confCHECK_RFC_IGNORANT', `ifelse(confCHECK_RFC_IGNORANT, `NO', `dnl', `dnl ACL(`check_rfc_ignorant')dnl ')') ', ` FEATURE(`rfc_ignorant_list')dnl ') ifdef(`confSECONDARY_RELAY', `ifelse(confSECONDARY_RELAY, `NO', `dnl', `dnl ACL(`verify_recipient')dnl ')') ifdef(`confOPTIONAL_REJECT', `ifelse(confOPTIONAL_REJECT, `NO', `dnl', `dnl # OPTIONAL REJECT deny condition = ${if <{${extract{scores}{$acl_c6}}}{confOPTIONAL_REJECT_SCORES}{no}{yes}} message = Access denied due to complex of criterions. You may contact postmaster@$qualify_domain log_message = message reject by optional reject; reason:${extract{log_message}{$acl_c6}} ')') ifdef(`confGREYLIST_DBM', `ifelse(confGREYLIST_DBM, `NO', `dnl', `dnl FEATURE(`greylist-dbm')dnl ')') define(`SECTION', `ACL_CHECK_RCPT_BOTTOM')dnl ifdef(`confSPAMASSASSIN', `ifelse(confSPAMASSASSIN, `NO', `dnl', `dnl FEATURE(`spamassassin')dnl ')') FEATURE(`antivirus', ` warn domains = +local_domains') # Прием почты для получателей из локальных доменов accept domains = +local_domains endpass ifdef(`confDOMAIN_LITERALS', `ifelse(confDOMAIN_LITERALS, `NO', `dnl', `dnl FEATURE(`domain_literals')dnl ')') ifdef(`confMAILERTABLE', `ifelse(confMAILERTABLE, `NO', `dnl', `dnl DELIVERY(`mailertable')dnl ')') ifdef(`confEXCHANGE_ROUTERS', `ifelse(confEXCHANGE_ROUTERS, `NO', `dnl', `dnl FEATURE(`exchange')dnl ')') ifdef(`confDOMINO_ROUTERS', `ifelse(confDOMINO_ROUTERS, `NO', `dnl', `dnl FEATURE(`domino')dnl ')') ifelse_strstr(confDELIVERY_TO, `CYRUS', `dnl DELIVERY(`cyrus')dnl ') ifdef(`confSECONDARY_RELAY', `ifelse(confSECONDARY_RELAY, `NO', `dnl', `dnl ACL(`verify_recipient')dnl ')') ifdef(`confRELAY_BASED_ON_MX', `ifelse(confRELAY_BASED_ON_MX, `NO', `dnl', `dnl FEATURE(`relay_based_on_MX')dnl ')') # Отвергание остальной почты deny message = Relay not permitted. Proper authentication required acl_check_mime: define(`SECTION', `ACL_CHECK_MIME')dnl accept condition = ${if eq{$acl_m9}{abuse_or_postmaster}{yes}{no}} ifdef(`confWHITE_LIST_RELAYS', `ifelse(confWHITE_LIST_RELAYS, `NO', `', ` accept condition = ${if eq{$acl_m9}{white_list_relays}{yes}{no}} ')') ifdef(`confWHITE_LIST_SENDERS', `ifelse(confWHITE_LIST_SENDERS, `NO', `', ` accept condition = ${if eq{$acl_m9}{white_list_senders}{yes}{no}} ')') ifdef(`confCHECK_FILE_EXT', `ifelse(confCHECK_FILE_EXT, `NO', `dnl', `dnl ACL(`check_ext')dnl ')') ifdef(`confCHECK_TRANSFER_ENCODING_MULTIPART', `ifelse(confCHECK_TRANSFER_ENCODING_MULTIPART, `NO', `dnl', `dnl ACL(`check_transfer_encoding_multipart')dnl ')') ifdef(`confCHECK_BOUNDARY', `ifelse(confCHECK_BOUNDARY, `NO', `dnl', `dnl ACL(`check_boundary')dnl ')') ifdef(`confCHECK_CLSID', `ifelse(confCHECK_CLSID, `NO', `dnl', `dnl ACL(`check_clsid')dnl ')') ifdef(`confCHECK_DOUBLE_EXT', `ifelse(confCHECK_DOUBLE_EXT, `NO', `dnl', `dnl ACL(`check_double_ext')dnl ')') accept acl_check_data: define(`SECTION', `ACL_CHECK_DATA_TOP')dnl ifelse(confFAKE_REJECT, `NO', `dnl', `dnl warn condition = ${if eq{$acl_m6}{}{no}{yes}} control = fakereject/${extract{3}{|}{$acl_m6}} log_message = ${extract{1}{|}{$acl_m6}} message = ${extract{2}{|}{$acl_m6}} logwrite = original recipients: $recipients ') warn set acl_m4 = warn set acl_m6 = ifdef(`confSPAMASSASSIN', `ifelse(confSPAMASSASSIN, `NO', `dnl', `dnl FEATURE(`spamassassin')dnl ')') define(`SECTION', `ACL_CHECK_DATA')dnl ifdef(`confANTIVIRUS0_ACT', `dnl FEATURE(`antivirus') ') accept condition = ${if eq{$acl_m9}{abuse_or_postmaster}{yes}{no}} ifdef(`confCHECK_MESSAGE_ID', `ifelse(confCHECK_MESSAGE_ID, `NO', `dnl', `dnl ACL(`check_message_id')dnl ')') ifdef(`confMESSAGE_ID_HEADER_ADD', `ifelse(confMESSAGE_ID_HEADER_ADD, `NO', `dnl', `dnl FEATURE(`add_message_id')dnl ')') ifdef(`confDATE_HEADER_ADD', `ifelse(confDATE_HEADER_ADD, `NO', `dnl', `dnl FEATURE(`add_date')dnl ')') ifdef(`confCHECK_FILE_EXT', `ifelse(confCHECK_FILE_EXT, `NO', `dnl', `dnl ACL(`check_ext')dnl ')') ifdef(`confWHITE_LIST_RELAYS', `ifelse(confWHITE_LIST_RELAYS, `NO', `', ` accept condition = ${if eq{$acl_m9}{white_list_relays}{yes}{no}} ')') ifdef(`confWHITE_LIST_SENDERS', `ifelse(confWHITE_LIST_SENDERS, `NO', `', ` accept condition = ${if eq{$acl_m9}{white_list_senders}{yes}{no}} ')') ifdef(`confCHECK_CHARSET', `ifelse(confCHECK_CHARSET, `NO', `dnl', `dnl ACL(`check_charset')dnl ')') ifdef(`confCHECK_TRANSFER_ENCODING', `ifelse(confCHECK_TRANSFER_ENCODING, `NO', `dnl', `dnl ACL(`check_transfer_encoding')dnl ')') ifdef(`confCHECK_MAILER', `ifelse(confCHECK_MAILER, `NO', `dnl', `dnl ACL(`check_mailer')dnl ')') ifdef(`confCHECK_8BIT_HEADERS', `ifelse(confCHECK_8BIT_HEADERS, `NO', `dnl', `dnl ACL(`check_8bit_headers')dnl ')') ifdef(`confCHECK_SUBJECT', `ifelse(confCHECK_SUBJECT, `NO', `dnl', `dnl ACL(`check_subject')dnl ')') ifdef(`confCHECK_ORG', `ifelse(confCHECK_ORG, `NO', `dnl', `dnl ACL(`check_org')dnl ')') ifdef(`confCHECK_MIME_ERRORS', `ifelse(confCHECK_MIME_ERRORS, `NO', `dnl', `dnl ACL(`check_mime_errors')dnl ')') ifdef(`confCHECK_BODY_REGEXP', `ifelse(confCHECK_BODY_REGEXP, `NO', `dnl', `dnl ACL(`check_body_regexp')dnl ')') ifdef(`confSPAMASSASSIN', `ifelse(confSPAMASSASSIN, `NO', `dnl', `dnl FEATURE(`spamassassin')dnl ')') accept define(`SECTION', `ACLS_ADDITIONAL')dnl ifdef(`confGREYLIST_DBM', `ifelse(confGREYLIST_DBM, `NO', `dnl', `dnl FEATURE(`greylist-dbm')dnl ')') ifdef(`confANTIVIRUS0_ACT', `dnl FEATURE(`antivirus') ') ifdef(`confSPAMASSASSIN', `ifelse(confSPAMASSASSIN, `NO', `dnl', `dnl FEATURE(`spamassassin')dnl ')') ifdef(`confRELAY_BASED_ON_MX', `ifelse(confRELAY_BASED_ON_MX, `NO', `dnl', `dnl FEATURE(`relay_based_on_MX')dnl ')') FEATURE(`mysql_safe_queries')dnl begin routers define(`SECTION', `ROUTERS')dnl ifdef(`confSPAMASSASSIN', `ifelse(confSPAMASSASSIN, `NO', `dnl', `dnl FEATURE(`spamassassin')dnl ')') ifdef(`confVIRTUSERTABLE', `ifelse(confVIRTUSERTABLE, `NO', `dnl', `dnl FEATURE(`virtusertable')dnl ')') ifdef(`confEXCHANGE_ROUTERS', `ifelse(confEXCHANGE_ROUTERS, `NO', `dnl', `dnl FEATURE(`exchange')dnl ')') ifdef(`confDOMINO_ROUTERS', `ifelse(confDOMINO_ROUTERS, `NO', `dnl', `dnl FEATURE(`domino')dnl ')') ifdef(`confMAILERTABLE', `ifelse(confMAILERTABLE, `NO', `dnl', `dnl DELIVERY(`mailertable')dnl ifdef(`confUUCP', `ifelse(confUUCP, `NO', `dnl', `dnl DELIVERY(`uucp')dnl ')') ')') ifdef(`confSMART_HOST', `ifelse(confSMART_HOST, `NO', `dnl', `dnl FEATURE(`smarthost')dnl ')') ifdef(`confFALL_BACK_MX_DELAYED', `ifelse(confFALL_BACK_MX_DELAYED, `NO', `dnl', `dnl FEATURE(`fallback_mx')dnl ')') ifdef(`confDOMAIN_LITERALS', `ifelse(confDOMAIN_LITERALS, `NO', `dnl', `dnl FEATURE(`domain_literals')dnl ')') DELIVERY(`backup_outgoing')dnl ifdef(`confSRS', `ifelse(confSRS, `NO', `dnl', `dnl FEATURE(`srs')dnl ')') ifdef(`confRELAY_BASED_ON_MX', `ifelse(confRELAY_BASED_ON_MX, `NO', `dnl', `dnl FEATURE(`relay_based_on_MX')dnl ')') dnslookup: driver = dnslookup domains = DNSLOOKUP_DOMAINS transport = remote_smtp ignore_target_hosts = 0.0.0.0 DNSLOOKUP_IGNORE_TARGET_HOSTS \ : !+relay_from_hosts \ : 10.0.0.0/8 \ : 14.0.0.0/8 \ : 24.0.0.0/8 \ : 39.0.0.0/8 \ : 128.0.0.0/16 \ : 169.254.0.0/16 \ : 172.16.0.0/12 \ : 191.255.0.0/16 \ : 192.0.0.0/24 \ : 192.0.2.0/24 \ : 192.88.99.0/24 \ : 192.168.0.0/16 \ : 198.18.0.0/15 \ : 223.255.255.0/24 \ : 224.0.0.0/4 \ : 240.0.0.0/5 \ # следующие сети взяты с http://www.cymru.com/Documents/secure-bind-template.html : 0.0.0.0/8 \ : 1.0.0.0/8 \ : 2.0.0.0/8 \ : 5.0.0.0/8 \ : 7.0.0.0/8 \ : 10.0.0.0/8 \ : 23.0.0.0/8 \ : 27.0.0.0/8 \ : 31.0.0.0/8 \ : 36.0.0.0/8 \ : 37.0.0.0/8 \ : 39.0.0.0/8 \ : 42.0.0.0/8 \ : 49.0.0.0/8 \ : 50.0.0.0/8 \ : 74.0.0.0/8 \ : 75.0.0.0/8 \ : 76.0.0.0/8 \ : 77.0.0.0/8 \ : 78.0.0.0/8 \ : 79.0.0.0/8 \ : 89.0.0.0/8 \ : 90.0.0.0/8 \ : 91.0.0.0/8 \ : 92.0.0.0/8 \ : 93.0.0.0/8 \ : 94.0.0.0/8 \ : 95.0.0.0/8 \ : 96.0.0.0/8 \ : 97.0.0.0/8 \ : 98.0.0.0/8 \ : 99.0.0.0/8 \ : 100.0.0.0/8 \ : 101.0.0.0/8 \ : 102.0.0.0/8 \ : 103.0.0.0/8 \ : 104.0.0.0/8 \ : 105.0.0.0/8 \ : 106.0.0.0/8 \ : 107.0.0.0/8 \ : 108.0.0.0/8 \ : 109.0.0.0/8 \ : 110.0.0.0/8 \ : 111.0.0.0/8 \ : 112.0.0.0/8 \ : 113.0.0.0/8 \ : 114.0.0.0/8 \ : 115.0.0.0/8 \ : 116.0.0.0/8 \ : 118.0.0.0/8 \ : 119.0.0.0/8 \ : 120.0.0.0/8 \ : 121.0.0.0/8 \ : 122.0.0.0/8 \ : 123.0.0.0/8 \ : 169.254.0.0/16 \ : 172.16.0.0/12 \ : 173.0.0.0/8 \ : 174.0.0.0/8 \ : 175.0.0.0/8 \ : 176.0.0.0/8 \ : 177.0.0.0/8 \ : 178.0.0.0/8 \ : 179.0.0.0/8 \ : 180.0.0.0/8 \ : 181.0.0.0/8 \ : 182.0.0.0/8 \ : 183.0.0.0/8 \ : 184.0.0.0/8 \ : 185.0.0.0/8 \ : 186.0.0.0/8 \ : 187.0.0.0/8 \ : 189.0.0.0/8 \ : 190.0.0.0/8 \ : 192.0.2.0/24 \ : 192.168.0.0/16 \ : 197.0.0.0/8 \ : 223.0.0.0/8 \ : 224.0.0.0/3 no_more ifelse_strstr(confDELIVERY_TO, `CYRUS', `dnl DELIVERY(`cyrus')dnl ') ifelse_strstr(confDELIVERY_TO, `MDIR_VIRTUAL', `dnl DELIVERY(`maildir_virtual')dnl ') ifelse_strstr(confDELIVERY_TO, `MDIR_USER', `dnl DELIVERY(`maildir_user')dnl ') ifelse_strstr(confDELIVERY_TO, `MBOX', `dnl DELIVERY(`mailbox')dnl ') ifdef(`confLUSER', `ifelse(confLUSER, `NO', `dnl', `dnl FEATURE(`luser')dnl ')') ifdef(`confMAILMAN', `ifelse(confMAILMAN, `NO', `dnl', `dnl FEATURE(`mailman')dnl ')') begin transports define(`SECTION', `TRANSPORTS')dnl #fake_transport: # driver = appendfile # file = /dev/null remote_smtp: driver = smtp ifdef(`confSMTP_AUTH_CLIENT', `ifelse(confSMTP_AUTH_CLIENT, `NO', `dnl', `dnl hosts_try_auth = +hosts_try_auth ')') ifdef(`confFALL_BACK_MX', `ifelse(confFALL_BACK_MX, `NO', `dnl', `dnl define(`_I_',`eval(index(confFALL_BACK_MX,` ') >= 0)')`'ifelse(_I_,`1', ` fallback_hosts = ${sg{confFALL_BACK_MX}{ }{}}', ` fallback_hosts = confFALL_BACK_MX') ')') ifdef(`confSMTP_SERIALIZE_HOSTS', `ifelse(confSMTP_SERIALIZE_HOSTS, `NO', `dnl', `dnl serialize_hosts = +serialize_hosts ')') ifdef(`confMAILERTABLE', `ifelse(confMAILERTABLE, `NO', `dnl', `dnl DELIVERY(`mailertable')dnl ifdef(`confUUCP', `ifelse(confUUCP, `NO', `dnl', `dnl DELIVERY(`uucp')dnl ')') ')') ifelse_strstr(confDELIVERY_TO, `MDIR_VIRTUAL', `dnl DELIVERY(`maildir_virtual')dnl ') ifelse_strstr(confDELIVERY_TO, `MDIR_USER', `dnl DELIVERY(`maildir_user')dnl ') ifelse_strstr(confDELIVERY_TO, `MBOX', `dnl DELIVERY(`mailbox')dnl ') ifelse_strstr(confDELIVERY_TO, `PROCMAIL', `dnl DELIVERY(`procmail')dnl ') ifelse_strstr(confDELIVERY_TO, `CYRUS', `dnl DELIVERY(`cyrus')dnl ') ifdef(`confMAILMAN', `ifelse(confMAILMAN, `NO', `dnl', `dnl FEATURE(`mailman')dnl ')') filter_pipe: driver = pipe # user = mailnull # group = mail return_fail_output address_pipe: driver = pipe # return_output message_prefix = return_fail_output address_file: driver = appendfile delivery_date_add envelope_to_add return_path_add address_directory: driver = appendfile delivery_date_add envelope_to_add return_path_add maildir_format = true # create_directory = true # directory_mode = 750 # mode = 0640 address_reply: driver = autoreply begin retry define(`SECTION', `RETRY')dnl include(confSITE_DIR`/retry_rules')dnl begin rewrite define(`SECTION', `REWRITE')dnl include(confSITE_DIR`/rewrite_rules')dnl begin authenticators define(`SECTION', `AUTHENTICATORS')dnl ifdef(`confSMTP_AUTH', `ifelse(confSMTP_AUTH, `NO', `dnl', `dnl FEATURE(`auth')dnl ')') ifdef(`confSMTP_AUTH_CLIENT', `ifelse(confSMTP_AUTH_CLIENT, `NO', `dnl', `dnl FEATURE(`auth_client')dnl ')')