diff --git a/configure b/configure index fc0592a..b6bac1a 100755 --- a/configure +++ b/configure @@ -699,7 +699,6 @@ enable_compat_layout enable_clamd enable_memcached -enable_starttls enable_tcpwrappers enable_tweak_sent_time with_database @@ -1325,7 +1324,6 @@ --enable-compat-layout support for older storage layout (default: no) --enable-clamd build clamd antivirus support --enable-memcached build memcached support - --enable-starttls build starttls support --enable-tcpwrappers build tcpwrappers support --tweak-sent-time tweak sent time @@ -3445,7 +3443,6 @@ have_tre="no" have_zip="no" have_zlib="no" -have_starttls="no" have_tcpwrappers="no" have_tweak_sent_time="no" @@ -3537,15 +3534,6 @@ -# Check whether --enable-starttls was given. -if test "${enable_starttls+set}" = set; then : - enableval=$enable_starttls; have_starttls=$enableval -else - have_starttls="no" -fi - - - # Check whether --enable-tcpwrappers was given. if test "${enable_tcpwrappers+set}" = set; then : enableval=$enable_tcpwrappers; want_tcpwrappers=$enableval @@ -4738,15 +4726,6 @@ antispam_libs="$antispam_libs -lzip" fi -if test "$have_starttls" = "yes"; then - echo "starttls support: yes" - -cat >>confdefs.h <<_ACEOF -#define HAVE_STARTTLS 1 -_ACEOF - -fi - if test "$have_tcpwrappers" = "yes"; then echo "tcpwrappers support: yes" diff --git a/configure.in b/configure.in index cbe3ae0..cc8a5d4 100644 --- a/configure.in +++ b/configure.in @@ -41,7 +41,6 @@ have_tre="no" have_zip="no" have_zlib="no" -have_starttls="no" have_tcpwrappers="no" have_tweak_sent_time="no" @@ -116,10 +115,6 @@ [ --enable-memcached build memcached support], want_memcached=$enableval, want_memcached="no") -AC_ARG_ENABLE(starttls, - [ --enable-starttls build starttls support], have_starttls=$enableval, have_starttls="no") - - AC_ARG_ENABLE(tcpwrappers, [ --enable-tcpwrappers build tcpwrappers support], want_tcpwrappers=$enableval, want_tcpwrappers="no") @@ -445,11 +440,6 @@ antispam_libs="$antispam_libs -lzip" fi -if test "$have_starttls" = "yes"; then - echo "starttls support: yes" - AC_DEFINE_UNQUOTED(HAVE_STARTTLS, 1, [starttls support]) -fi - if test "$have_tcpwrappers" = "yes"; then echo "tcpwrappers support: yes" AC_DEFINE_UNQUOTED(HAVE_LIBWRAP, 1, [tcpwrappers support]) diff --git a/piler-config.h.in b/piler-config.h.in index 694f4e6..feb78ea 100644 --- a/piler-config.h.in +++ b/piler-config.h.in @@ -24,7 +24,6 @@ #undef HAVE_TNEF #undef HAVE_ZIP -#undef HAVE_STARTTLS #undef HAVE_LIBWRAP #undef HAVE_TWEAK_SENT_TIME diff --git a/src/config.h b/src/config.h index 8665832..762538f 100644 --- a/src/config.h +++ b/src/config.h @@ -13,7 +13,7 @@ #define VERSION "1.2.0-master" -#define BUILD 943 +#define BUILD 944 #define HOSTID "mailarchiver" diff --git a/src/piler.c b/src/piler.c index 5acf9de..7caf7ee 100644 --- a/src/piler.c +++ b/src/piler.c @@ -244,11 +244,9 @@ if(data.dedup != MAP_FAILED) munmap(data.dedup, MAXCHILDREN*DIGEST_LENGTH*2); -#ifdef HAVE_STARTTLS if(data.ctx) SSL_CTX_free(data.ctx); ERR_free_strings(); -#endif exit(1); } @@ -260,7 +258,6 @@ } -#ifdef HAVE_STARTTLS int init_ssl(){ SSL_library_init(); @@ -278,7 +275,6 @@ return OK; } -#endif void initialise_configuration(){ @@ -323,11 +319,9 @@ initrules(data.retention_rules); initrules(data.folder_rules); -#ifdef HAVE_STARTTLS if(cfg.tls_enable > 0 && data.ctx == NULL && init_ssl() == OK){ snprintf(data.starttls, sizeof(data.starttls)-1, "250-STARTTLS\r\n"); } -#endif if(open_database(&sdata, &cfg) == ERR){ syslog(LOG_PRIORITY, "cannot connect to mysql server"); diff --git a/src/session.c b/src/session.c index 259d1d5..504b7df 100644 --- a/src/session.c +++ b/src/session.c @@ -37,9 +37,7 @@ struct timezone tz; struct timeval tv1, tv2; -#ifdef HAVE_STARTTLS int starttls = 0; -#endif #ifdef HAVE_LIBWRAP @@ -365,12 +363,10 @@ } - #ifdef HAVE_STARTTLS if(cfg->tls_enable > 0 && strncasecmp(buf, SMTP_CMD_STARTTLS, strlen(SMTP_CMD_STARTTLS)) == 0 && strlen(data->starttls) > 4 && sdata.tls == 0){ process_command_starttls(&sdata, data, &protocol_state, &starttls, new_sd, &resp[0], sizeof(resp)-1, cfg); continue; } - #endif if(strncasecmp(buf, SMTP_CMD_MAIL_FROM, strlen(SMTP_CMD_MAIL_FROM)) == 0){ @@ -465,12 +461,10 @@ close_database(&sdata); #endif -#ifdef HAVE_STARTTLS if(sdata.tls == 1){ SSL_shutdown(data->ssl); SSL_free(data->ssl); } -#endif if(cfg->verbosity >= _LOG_INFO) syslog(LOG_PRIORITY, "processed %llu messages", counters.c_rcvd); diff --git a/src/smtp.c b/src/smtp.c index 8e1c121..636dd44 100644 --- a/src/smtp.c +++ b/src/smtp.c @@ -32,7 +32,6 @@ } -#ifdef HAVE_STARTTLS void process_command_starttls(struct session_data *sdata, struct __data *data, int *protocol_state, int *starttls, int new_sd, char *resp, int resplen, struct __config *cfg){ if(cfg->verbosity >= _LOG_DEBUG) syslog(LOG_PRIORITY, "%s: starttls request from client", sdata->ttmpfile); @@ -54,7 +53,6 @@ strncat(resp, SMTP_RESP_454_ERR_TLS_TEMP_ERROR, resplen); } -#endif void process_command_mail_from(struct session_data *sdata, int *protocol_state, char *buf, char *resp, int resplen, struct __config *cfg){ @@ -163,16 +161,13 @@ void send_buffered_response(struct session_data *sdata, struct __data *data, int starttls, int new_sd, char *resp, struct __config *cfg){ int rc; -#ifdef HAVE_STARTTLS char ssl_error[SMALLBUFSIZE]; -#endif write1(new_sd, resp, strlen(resp), sdata->tls, data->ssl); if(cfg->verbosity >= _LOG_DEBUG) syslog(LOG_PRIORITY, "%s: sent: %s", sdata->ttmpfile, resp); memset(resp, 0, MAXBUFSIZE); -#ifdef HAVE_STARTTLS if(starttls == 1 && sdata->tls == 0){ if(cfg->verbosity >= _LOG_DEBUG) syslog(LOG_PRIORITY, "%s: waiting for ssl handshake", sdata->ttmpfile); @@ -189,7 +184,6 @@ syslog(LOG_PRIORITY, "%s: SSL_accept() failed, rc=%d, errorcode: %d, error text: %s\n", sdata->ttmpfile, rc, SSL_get_error(data->ssl, rc), ssl_error); } } -#endif }