#!/bin/sh include(confFEATURES_DIR`/cfhead.m4')dnl include(confM4_DIR`/conf.default')dnl include(confSITE_DIR/`conf')dnl changequote([[, ]]) ifdef([[confADD_X_ORIGINAL_RECIPIENTS]], [[ echo "ERROR: variable conf[[]]ADD_X_ORIGINAL_RECIPIENTS deprecated" echo "ERROR: remove it from your site/conf file" exit 1 ]]) ifelse(confMAIL_BACKUP, [[ROUTER]], [[ echo "ERROR: value ROUTER for variable conf[[]]MAIL_BACKUP deprecated" echo "ERROR: use ROUTER_REDIRECT or ROUTER_ACCEPT" exit 1 ]]) ifdef([[confMAILERTABLE_CALLOUTTABLE]], [[ echo "ERROR: variable conf[[]]MAILERTABLE_CALLOUTTABLE deprecated" echo "ERROR: it's always enabled then conf[[]]MAILERTABLE enabled" echo "ERROR: you must delete variable conf[[]]MAILERTABLE_CALLOUTTABLE from site/conf" exit 1 ]]) ifelse(confMAILERTABLE, [[NO]], [[]], [[ if [ ! -z "`grep -i 'smtp *[0-9]' confCONFIGURE_DIR/mailertable | grep -v '^ *#'`" ] ; then echo "ERROR: you must set smtp port number after hostname in mailertable" exit 1 fi if [ ! -z "`grep -i 'lmtp *[0-9]' confCONFIGURE_DIR/mailertable | grep -v '^ *#'`" ] ; then echo "ERROR: you must set lmtp port number after hostname in mailertable" exit 1 fi if [ ! -z "`grep -i 'mx(.*)' confCONFIGURE_DIR/mailertable | grep -v '^ *#'`" ] ; then echo "ERROR: mx(domain.tld) in mailertable is deprecated" echo "ERROR: use domain.tld/MX" exit 1 fi ]]) if [ -f confCONFIGURE_DIR/access-relay-dialup ] ; then echo "ERROR: file confCONFIGURE_DIR/access-relay-dialup must be renamed to confCONFIGURE_DIR/access-relay-dynamic" echo "ERROR: you must run gmake fix" exit 1 fi ifdef([[confCHECK_HELO_UNDERSCORE]], [[ echo "ERROR: variable conf[[]]CHECK_HELO_UNDERSCORE deprecated" echo "ERROR: use regular expression in access-helo instead" exit 1 ]]) ifdef([[confDISABLE_AUTH_WITHOUT_TLS]], [[ echo "ERROR: variable conf[[]]DISABLE_AUTH_WITHOUT_TLS deprecated" echo "ERROR: use conf[[]]SMTP_AUTH_RESTRICT instead" exit 1 ]]) ifdef([[confSPF]], [[ echo "ERROR: variable conf[[]]SPF deprecated" echo "ERROR: use conf[[]]SPF2 instead" exit 1 ]]) ifdef([[confEXCHANGE_ROUTERS]], [[ echo "ERROR: variable conf[[]]EXCHANGE_ROUTERS deprecated" exit 1 ]]) ifdef([[confEXCHANGE_AD_HOSTS]], [[ echo "ERROR: variable conf[[]]EXCHANGE_AD_HOSTS deprecated" exit 1 ]]) ifdef([[confEXCHANGE_LDAP_USER]], [[ echo "ERROR: variable conf[[]]EXCHANGE_LDAP_USER deprecated" exit 1 ]]) ifdef([[confEXCHANGE_LDAP_PASSWORD]], [[ echo "ERROR: variable conf[[]]EXCHANGE_LDAP_PASSWORD deprecated" exit 1 ]]) ifdef([[confEXCHANGE_LDAP_BASE]], [[ echo "ERROR: variable conf[[]]EXCHANGE_LDAP_BASE deprecated" exit 1 ]]) if [ -f confCONFIGURE_DIR/domains-exchange ] ; then echo "ERROR: file confCONFIGURE_DIR/domains-exchange deprecated" echo "ERROR: you must remove it run gmake fix" exit 1 fi if [ -f confCONFIGURE_DIR/skip_exch_check ] ; then echo "ERROR: file confCONFIGURE_DIR/skip_exch_check deprecated" echo "ERROR: you must remove it or run gmake fix" exit 1 fi ifdef([[confDOMINO_ROUTERS]], [[ echo "ERROR: variable conf[[]]DOMINO_ROUTERS deprecated" exit 1 ]]) ifdef([[confDOMINO_HOSTS]], [[ echo "ERROR: variable conf[[]]DOMINO_HOSTS deprecated" exit 1 ]]) ifdef([[confDOMINO_LDAP_BASE]], [[ echo "ERROR: variable conf[[]]DOMINO_LDAP_BASE deprecated" exit 1 ]]) if [ -f confCONFIGURE_DIR/domains-domino ] ; then echo "ERROR: file confCONFIGURE_DIR/domains-domino deprecated" echo "ERROR: you must remove it run gmake fix" exit 1 fi if [ -f confCONFIGURE_DIR/skip_domino_check ] ; then echo "ERROR: file confCONFIGURE_DIR/skip_domino_check deprecated" echo "ERROR: you must remove it or run gmake fix" exit 1 fi ifdef([[confCHECK_8BIT_HEADERS]], [[ echo "ERROR: variable conf[[]]CHECK_8BIT_HEADERS deprecated" exit 1 ]]) ifdef([[confCHECK_BODY_REGEXP]], [[ echo "ERROR: variable conf[[]]CHECK_BODY_REGEXP deprecated" exit 1 ]]) ifdef([[confCHECK_CHARSET_DEFAULT]], [[ echo "ERROR: variable conf[[]]CHECK_CHARSET_DEFAULT deprecated" exit 1 ]]) ifdef([[confCHECK_MAILER]], [[ echo "ERROR: variable conf[[]]CHECK_MAILER deprecated" exit 1 ]]) ifdef([[confCHECK_ORG]], [[ echo "ERROR: variable conf[[]]CHECK_ORG deprecated" exit 1 ]]) ifdef([[confCHECK_SUBJECT]], [[ echo "ERROR: variable conf[[]]CHECK_SUBJECT deprecated" exit 1 ]]) ifdef([[confCHECK_TRANSFER_ENCODING]], [[ echo "ERROR: variable conf[[]]CHECK_TRANSFER_ENCODING deprecated" exit 1 ]]) ifdef([[confCHECK_TRANSFER_ENCODING_MULTIPART]], [[ echo "ERROR: variable conf[[]]CHECK_TRANSFER_ENCODING_MULTIPART deprecated" exit 1 ]]) ifdef([[confCHECK_MAIL_8BIT]], [[ echo "ERROR: variable conf[[]]CHECK_MAIL_8BIT deprecated" echo "use conf[[]]CHECK_MAIL_ACCESS instead with row in access-mail:" echo "\N^.*[\x80-\xff].*$\N : deny : 8-bit characters not allowed in envelope sender" exit 1 ]]) ifdef([[confCHECK_RCPT_8BIT]], [[ echo "ERROR: variable conf[[]]CHECK_RCPT_8BIT deprecated" echo "use conf[[]]CHECK_RCPT_ACCESS instead with row in access-rcpt:" echo "\N^.*[\x80-\xff].*$\N : deny : 8-bit characters not allowed in envelope recipient" exit 1 ]]) if [ -f confCONFIGURE_DIR/access-spf ] ; then echo "ERROR: file confCONFIGURE_DIR/access-spf found" echo "ERROR: use variable conf[[]]SPF2 and confCONFIGURE_DIR/access-spf2 instead" exit 1 fi ifdef([[confGREYLIST_DBM_BLOCKED]], [[ echo "ERROR: variable conf[[]]GREYLIST_DBM_BLOCKED deprecated" echo "use conf[[]]GREYLIST_BLOCKED instead" exit 1 ]]) ifdef([[confGREYLIST_DBM_BLOCKED_OPTIONAL]], [[ echo "ERROR: variable conf[[]]GREYLIST_DBM_BLOCKED_OPTIONAL deprecated" echo "use conf[[]]GREYLIST_BLOCKED_OPTIONAL instead" exit 1 ]]) ifdef([[confGREYLIST_DBM_RECORD_EXPIRE_MIN]], [[ echo "ERROR: variable conf[[]]GREYLIST_DBM_RECORD_EXPIRE_MIN deprecated" echo "use conf[[]]GREYLIST_RECORD_EXPIRE_MIN instead" exit 1 ]]) ifdef([[confGREYLIST_DBM_RECORD_EXPIRE]], [[ echo "ERROR: variable conf[[]]GREYLIST_DBM_RECORD_EXPIRE deprecated" echo "use conf[[]]GREYLIST_RECORD_EXPIRE instead" exit 1 ]]) dnl ifdef([[confGREYLIST_DBM_COUNTRIES_SYNC]], [[ dnl echo "ERROR: variable conf[[]]GREYLIST_DBM_COUNTRIES_SYNC deprecated" dnl echo "use conf[[]]GREYLIST_COUNTRIES_SYNC instead" dnl exit 1 dnl ]]) dnl ifdef([[confGREYLIST_DBM_COUNTRIES]], [[ dnl echo "ERROR: variable conf[[]]GREYLIST_DBM_COUNTRIES deprecated" dnl echo "use conf[[]]GREYLIST_COUNTRIES instead" dnl exit 1 dnl ]]) ifdef([[confGREYLIST_DBM_ADDR_PRELOAD_TTL]], [[ echo "ERROR: variable conf[[]]GREYLIST_DBM_ADDR_PRELOAD_TTL deprecated" echo "use conf[[]]GREYLIST_ADDR_PRELOAD_TTL instead" exit 1 ]]) ifdef([[confGREYLIST_DBM_ADDR_PRELOAD]], [[ echo "ERROR: variable conf[[]]GREYLIST_DBM_ADDR_PRELOAD deprecated" echo "use conf[[]]GREYLIST_ADDR_PRELOAD instead" exit 1 ]]) ifdef([[confGREYLIST_DBM]], [[ echo "ERROR: variable conf[[]]GREYLIST_DBM deprecated" echo "use conf[[]]GREYLIST instead" exit 1 ]]) changequote ifelse_strstr(confDELIVERY_TO, `CYRUS', ` echo "ERROR: CYRUS is deprecated in conf`'DELIVERY_TO" echo "ERROR: use PIPE or LMTP delivery to cyrus-imapd (see m4/README)" exit 1 ') ifdef(`confCYRUS_MBPATH_PATH', ` echo "ERROR: variable conf`'CYRUS_MBPATH_PATH is deprecated" echo "ERROR: see CYRUS-IMAPD in conf`'VIRT_MDIR_USERLIST and conf`'VIRT_MDIR_CYRUS_MBPATH_PATH" exit 1 ') ifelse_strstr(confDELIVERY_TO, `DBMAIL', ` echo "ERROR: DBMAIL_PIPE and DBMAIL_LMTP are deprecated in conf`'DELIVERY_TO" echo "ERROR: use PIPE or LMTP delivery to dbmail (see m4/README)" exit 1 ') ifdef(`confDBMAIL_SMTP_PATH', ` echo "ERROR: variable conf`'DBMAIL_SMTP_PATH is deprecated" echo "ERROR: us must delete it from site/conf" exit 1 ') ifdef(`confDBMAIL_SMTP_USER', ` echo "ERROR: variable conf`'DBMAIL_SMTP_USER is deprecated" echo "ERROR: us must delete it from site/conf" exit 1 ') ifdef(`confDBMAIL_LMTP_HOST', ` echo "ERROR: variable conf`'DBMAIL_LMTP_HOST is deprecated" echo "ERROR: us must delete it from site/conf" exit 1 ') ifdef(`confDBMAIL_LMTP_PORT', ` echo "ERROR: variable conf`'DBMAIL_LMTP_PORT is deprecated" echo "ERROR: us must delete it from site/conf" exit 1 ') ifdef(`confDBMAIL_BACKEND', ` echo "ERROR: variable conf`'DBMAIL_BACKEND is deprecated" echo "ERROR: us must delete it from site/conf" exit 1 ') define(`_NEED_GREYLIST_RELAYS_', `NO') ifelse_strstr(confSPAMASSASSIN_ACTION, `GREYLIST', `define(`_NEED_GREYLIST_RELAYS_', `YES')') ifelse_strstr(confDSPAM_ACTION, `GREYLIST', `define(`_NEED_GREYLIST_RELAYS_', `YES')') ifelse_strstr(confKAS3_ACTION, `GREYLIST', `define(`_NEED_GREYLIST_RELAYS_', `YES')') ifelse_strstr(confSO2_ACTION, `GREYLIST', `define(`_NEED_GREYLIST_RELAYS_', `YES')') changequote([[, ]]) ifelse(confGREYLIST, [[NO]], [[]], [[ ifelse(confGREYLIST_RELAYS, [[NO]], [[ ifelse(_NEED_GREYLIST_RELAYS_, [[YES]], [[ echo "ERROR: some variables contain value SUBMIT_GREYLIST" echo "you must set variable conf[[]]GREYLIST_RELAYS to YES" exit 1 ]]) dnl ifelse(_NEED_GREYLIST_RELAYS_, [[YES]], [[]]) ]]) dnl ifelse(confGREYLIST_RELAYS, [[NO]], [[]]) ]]) dnl ifelse(confGREYLIST, [[NO]], [[]], [[]]) changequote ifelse_strstr(confCHECK_MESSAGE_ID, `GREYLIST', `define(`_NEED_GREYLIST_RELAYS_', `YES')') changequote([[, ]]) ifelse(confGREYLIST, [[NO]], [[]], [[ ifelse(confGREYLIST_RELAYS, [[NO]], [[ ifelse(_NEED_GREYLIST_RELAYS_, [[YES]], [[ echo "ERROR: variable conf[[]]CHECK_MESSAGE_ID contains value GREYLIST" echo "you must set variable conf[[]]GREYLIST_RELAYS to YES" exit 1 ]]) dnl ifelse_strstr(confCHECK_MESSAGE_ID, [[GREYLIST]], [[]]) ]]) dnl ifelse(confGREYLIST_RELAYS, [[NO]], [[]]) ]]) dnl ifelse(confGREYLIST, [[NO]], [[]], [[]]) changequote ifdef(`confGREYLIST_DBM_COUNTRIES', ` echo "ERROR: variable conf`'GREYLIST_DBM_COUNTRIES deprecated" echo "ERROR: use confCHECK_RELAY_COUNTRY_ACCESS and OPTIONAL Greylisting instead" echo "ERROR: you can put such rows into access-relay file:" echo "country_AR : greylist:10 : Message from AR greylisted" echo "country_BR : greylist:10 : Message from BR greylisted" exit 1 ') ifdef(`confGREYLIST_COUNTRIES', ` echo "ERROR: variable conf`'GREYLIST_COUNTRIES deprecated" echo "ERROR: use confCHECK_RELAY_COUNTRY_ACCESS and OPTIONAL Greylisting instead" echo "ERROR: you can put such rows into access-relay file:" echo "country_AR : greylist:10 : Message from AR greylisted" echo "country_BR : greylist:10 : Message from BR greylisted" exit 1 ') exit 0