message "Exim needs a hash DB so please pick one."
message "db - Berkeley DB is the default one and most common"
message "gdbm - The GNU version of a hashing database"
message "tdb - Hashing DB that supports multiple simultaneous writers"

if spell_ok db ; then 
config_query_list EXIM_DBM   "Select one hash DB" \
                            db \
                            gdbm \
                            tdb
elif spell_ok gdbm ; then
config_query_list EXIM_DBM   "Select one hash DB" \
                            gdbm \
                            db \
                            tdb
elif spell_ok tdb ; then
config_query_list EXIM_DBM   "Select one hash DB" \
                            tdb \
                            gdbm \
                            db
else
config_query_list EXIM_DBM   "Select one hash DB" \
                            db \
                            gdbm \
                            tdb
fi   &&


config_query EXIM_IPV6      "Enable IPv6 support?"                         n  &&
config_query EXIM_SOCKS     "Enable outbound (client-side) proxying, using Socks5 support?"  n  &&
config_query EXIM_PROXY     "Enable inbound (server-side) proxying, using Proxy Protocol support?"  n  &&
config_query EXIM_CDB       "Enable CDB lookup support?"                   n  &&
config_query EXIM_DSEARCH   "Enable dsearch lookup support?"               n  &&
config_query EXIM_MAILDIR   "Support maildir for appendfile transport?"    n  &&
config_query EXIM_MAILSTORE "Support mailstore for appendfile transport?"  n  &&
config_query EXIM_MBX       "Support MBX for appendfile transport?"        n  &&
config_query EXIM_NIS       "Enable NIS lookups?"                          n  &&
config_query EXIM_NISPLUS   "Enable NIS+ lookups?"                         n  &&
config_query EXIM_PASSWD    "Enable /etc/passwd lookups?"                  n  &&
config_query EXIM_SCAN      "Enable content scanning (exiscan)?"           n  &&
config_query EXIM_MD5       "Enable cram/md5 authentication?"              n  &&
config_query EXIM_PLAINTEXT "Enable plaintext authentication?"             n  &&
config_query EXIM_SPA       "Enable SPA authentication?"                   n  &&
config_query EXIM_TLSA      "Enable TLS authentication?"                   n  &&
config_query EXIM_FROZEN    "Enable moving frozen messages?"               n  &&
config_query EXIM_DEMIME    "Enable old demime support?"                   n  &&

if    spell_ok  hc-cron; then
  config_query_list  EXIM_CRON  "Use which cron to resend undelivered mail?"  \
                     hc-cron  fcron  none
elif  spell_ok  fcron;  then
  config_query_list  EXIM_CRON  "Use which cron to resend undelivered mail?"  \
                     fcron  hc-cron  none
else
  config_query_list  EXIM_CRON  "Use which cron to resend undelivered mail?"  \
                     none  hc-cron  fcron
fi  &&

if  spell_ok  gnutls;  then
  config_query_list  EXIM_TLS  'Enable GNU TLS support?'  \
                     gnutls  openssl
elif spell_ok openssl || spell_ok libressl; then
  config_query_list  EXIM_TLS  'Enable GNU TLS support?'  \
                     openssl  gnutls
else
  config_query_list  EXIM_TLS  'Enable GNU TLS support?'  \
                     gnutls  openssl
fi
