--- SMTPUtils.cpp.orig	2010-05-01 08:55:44.000000000 +0200
+++ SMTPUtils.cpp	2010-05-01 08:59:28.000000000 +0200
@@ -28,8 +28,10 @@
 #include "StrUtils.h"
 #include "SList.h"
 #include "BuffSock.h"
+#ifdef WITH_SSL
 #include "SSLBind.h"
 #include "SSLConfig.h"
+#endif
 #include "MailConfig.h"
 #include "UsrUtils.h"
 #include "UsrAuth.h"
@@ -161,6 +163,7 @@
 {
 	SMTPGateway *pGw = (SMTPGateway *) pPrivate;
 
+#ifdef WITH_SSL
 	if (strcmp(pszName, "NeedTLS") == 0) {
 		if (pszValue != NULL) {
 			int iNeedTLS = atoi(pszValue);
@@ -172,6 +175,9 @@
 				pGw->ulFlags |= SMTP_GWF_FORCE_TLS;
 		}
 	} else if (strcmp(pszName, "OutBind") == 0) {
+#else
+	if (strcmp(pszName, "OutBind") == 0) {
+#endif
 		if (pszValue != NULL) {
 			SysFree(pGw->pszIFace);
 			pGw->pszIFace = SysStrDup(pszValue);
@@ -1116,14 +1122,17 @@
 
 			if (pszLine[4] == ' ' && isdigit(pszLine[5]))
 				pSmtpCh->ulMaxMsgSize = (unsigned long) atol(pszLine + 5);
+#ifdef WITH_SSL
 		} else if (StrCmdMatch(pszLine, "STARTTLS")) {
 			pSmtpCh->ulFlags |= SMTPCH_SUPPORT_TLS;
+#endif
 		}
 	}
 
 	return 0;
 }
 
+#ifdef WITH_SSL
 static int USmtpSslEnvCB(void *pPrivate, int iID, void const *pData)
 {
 	SslBindEnv *pSslE = (SslBindEnv *) pPrivate;
@@ -1186,6 +1195,7 @@
 
 	return iError;
 }
+#endif
 
 static void USmtpCleanEHLO(SmtpChannel *pSmtpCh)
 {
@@ -1321,6 +1331,7 @@
 			return INVALID_SMTPCH_HANDLE;
 		}
 	}
+#ifdef WITH_SSL
 	/*
 	 * Do we need SSL?
 	 */
@@ -1339,6 +1350,7 @@
 			goto SendHELO;
 		}
 	}
+#endif
 
 	/* Check if We need authentication */
 	if (USmtpServerAuthenticate(pSmtpCh, szAddress, pSMTPE) < 0) {
