--- POP3Utils.cpp.orig	2010-05-01 08:35:13.000000000 +0200
+++ POP3Utils.cpp	2010-05-01 08:38:50.000000000 +0200
@@ -29,8 +29,10 @@
 #include "SList.h"
 #include "BuffSock.h"
 #include "Hash.h"
+#ifdef WITH_SSL
 #include "SSLBind.h"
 #include "SSLConfig.h"
+#endif
 #include "MD5.h"
 #include "MailConfig.h"
 #include "UsrUtils.h"
@@ -840,6 +842,7 @@
 	return 0;
 }
 
+#ifdef WITH_SSL
 static int UPopSwitchToTLS(BSOCK_HANDLE hBSock, char const *pszServer,
 			   POP3ChannelCfg const *pChCfg)
 {
@@ -874,6 +877,7 @@
 
 	return UPopSwitchToTLS(hBSock, pszServer, pChCfg);
 }
+#endif
 
 static BSOCK_HANDLE UPopCreateChannel(char const *pszServer, char const *pszUsername,
 				      char const *pszPassword, POP3ChannelCfg const *pChCfg)
@@ -908,6 +912,7 @@
 		SysCloseSocket(SockFD);
 		return INVALID_BSOCK_HANDLE;
 	}
+#ifdef WITH_SSL
 	/*
 	 * Is this a full POP3S connection?
 	 */
@@ -916,6 +921,7 @@
 		SysCloseSocket(SockFD);
 		return INVALID_BSOCK_HANDLE;
 	}
+#endif
 
 	/* Read welcome message */
 	char szRTXBuffer[2048];
@@ -925,6 +931,7 @@
 		UPopCloseChannel(hBSock);
 		return INVALID_BSOCK_HANDLE;
 	}
+#ifdef WITH_SSL
 	/*
 	 * Non TLS mode active and STLS required?
 	 */
@@ -935,6 +942,7 @@
 		UPopCloseChannel(hBSock);
 		return INVALID_BSOCK_HANDLE;
 	}
+#endif
 
 	/* Extract TimeStamp from server respose (if any) */
 	char szTimeStamp[256] = "";
@@ -1075,12 +1083,14 @@
 		pChCfg->ulFlags |= POPCHF_USE_APOP;
 	else if (strcmp(pszName, "FAPOP") == 0)
 		pChCfg->ulFlags |= POPCHF_USE_APOP | POPCHF_FORCE_APOP;
+#ifdef WITH_SSL
 	else if (strcmp(pszName, "STLS") == 0)
 		pChCfg->ulFlags |= POPCHF_USE_STLS;
 	else if (strcmp(pszName, "FSTLS") == 0)
 		pChCfg->ulFlags |= POPCHF_USE_STLS | POPCHF_FORCE_STLS;
 	else if (strcmp(pszName, "POP3S") == 0)
 		pChCfg->ulFlags |= POPCHF_USE_POP3S;
+#endif
 	else if (strcmp(pszName, "Leave") == 0) {
 		if (pszValue == NULL || atoi(pszValue) > 0)
 			pChCfg->ulFlags |= POPCHF_LEAVE_MSGS;
